[Numpy-discussion] return unique combinations of stacked arrays - slow

2014-10-21 Thread Matt Gregory
: out_dict = {} out = np.zeros_like(a) count = 0 stack = np.vstack((a, b, c)).T for (i, arr) in enumerate(stack): t = tuple(arr) if t not in out_dict: out_dict[t] = count count += 1 out[i] = out_dict[t] Thanks for help, matt _

Re: [Numpy-discussion] Writing successful tests

2014-04-14 Thread Matt Pagan
ts. This info got me a more useful error message, which I used to make this commit to my local fork: https://github.com/mttp/numpy/commit/480c51b17c608a2cbcca65b8a633dbe1b1654070 Seems to fix the problem. -- Matt Pagan m...@pagan.io PGP: 0xE9284418E360583C ___

[Numpy-discussion] Writing successful tests

2014-04-13 Thread matt
t see functions like this associated with any of the other classes in numpy/lib/tests/test_twodim_base.py though. Any hints on how to proceed? -- Matt Pagan m...@pagan.io PGP: 0xE9284418E360583C ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.

Re: [Numpy-discussion] Implementing elementary matrices

2014-03-24 Thread Matt Pagan
of my patch? Should I make a github pull request? - -- Matt Pagan m...@pagan.io PGP: 0xE9284418E360583C -BEGIN PGP SIGNATURE- iQIcBAEBCgAGBQJTMGKDAAoJEOkoRBjjYFg8DXwQALE95t9SS8xsFD0PpO3SwZNQ v2SxcnzH123mcrq55zzzHGgh9OUz694fqky2thyiazhKf5sSVka1Gf4b6U06nXE7 OG7+i9qGZgAf6cLBItmPYp2F

[Numpy-discussion] Implementing elementary matrices

2014-03-23 Thread Matt Pagan
if j==None and t==None: +raise ValueError("One or more of %s and %s must be set." % \ +('j', 't')) +return None +elif t==None: +swap = np.array(m[i]) +m[i] = m[j] +m[j] = swap +return m + elif j==None: +

Re: [Numpy-discussion] Header files in windows installers

2014-02-21 Thread Matt Newell
is no bug to report. I only assumed that the header files weren't installed because I couldn't find them in the include dir inside the python installation, and the installer gave no options. I'm not well versed in the normal system for compiling and dist

[Numpy-discussion] Header files in windows installers

2014-02-20 Thread Matt Newell
few modifications to _numpyconfig.h got my extension compiled and working. Is there any chance that the includes could be included in future releases? Thanks, Matt Newell ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/ma

[Numpy-discussion] Plotly: Python Sandbox (NumPy supported) and Plotting Library

2013-11-06 Thread Matt Sundquist
Hey NumPy users, My name is Matt, and I'm part of Plot.ly, a graphing and analytics startup. We just launched a beta, and wanted to reach out to this group about our Python and Numpy features. *Background.* Plotly's graphing libraries let you make interactive, publication-quality plo

[Numpy-discussion] Use numpy.distutils to build fortran with BLAS

2013-08-28 Thread Matt Hoffman
nfig.add_extension( sources=sources, extra_info=extra_info, extra_link_args=extra_link_args ) setup(**config.todict()) Thanks! -matt ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] numpy reference array

2013-03-18 Thread Matt U
> > HTH, > -Chris > Hi Chris, Thanks for the reply, you've just saved me a lot of time. I did run across 'views' but it looked like I couldn't have my data arbitrarily arranged. Thank you for confirming that. Unfortunately my

[Numpy-discussion] numpy reference array

2013-03-13 Thread Matt U
Is it possible to create a numpy array which points to the same data in a different numpy array (but in different order etc)? For example: Code: -- import numpy as np a = np.arange(10) ids = np.array([0,0,5,5,9,9,1,1]) b

Re: [Numpy-discussion] Licensing question

2012-08-08 Thread Matt Terry
> Nice, I am starting to get out of touch with too many packages... > Would be nice to add DCT and DST support to it. FWIW, the DCT has been in scipy.fftpack for a while and DST was just added. ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org

Re: [Numpy-discussion] Cygwin compile: fatal error: fenv/fenv.c

2012-02-29 Thread Matt Miller
More reading of the thread linked solved the issue. To reiterate, add numpy/ and change .c to .h in line 590 of ieee754.c.src. Ex: elif defined(__CYGWIN__) include "numpy/fenv/fenv.h" endif Thanks, On Wed, Feb 29, 2012 at 1:41 PM, Matt Miller wrote: > That fixed changed my

Re: [Numpy-discussion] Cygwin compile: fatal error: fenv/fenv.c

2012-02-29 Thread Matt Miller
That fixed changed my error message to this: numpy/core/src/private/lowlevel_strided_loops.h:404:1: warning: ‘PyArray_PrepareThreeRawArrayIter’ declared ‘static’ but never defined numpy/core/src/private/lowlevel_strided_loops.h:430:1: warning: ‘PyArray_PrepareFourRawArrayIter’ declared ‘static’ bu

[Numpy-discussion] Cygwin compile: fatal error: fenv/fenv.c:

2012-02-29 Thread Matt Miller
Hi all, I am getting the following error when running `python setup.py install` for Numpy in Cygwin. This error happens on the latest as well as the maintenance branched for 1.5 and 1.6. ... creating build/temp.cygwin-1.7.11-i686-2.6 creating build/temp.cygwin-1.7.11-i686-2.6/build creating build

Re: [Numpy-discussion] dealing with datetime UTC vs linear time

2011-06-06 Thread Matt Knox
sively with relational databases (sql server, mysql, etc) and all (most?) of the python database adapters use python datetime objects when passing data back and forth from the database to python. So people wanting to analyze date / time series data from relational databases in n

Re: [Numpy-discussion] creating zonal statistics from two arrays

2010-12-20 Thread Matt Gregory
that I was after: http://sites.google.com/site/spatialpython/zonal-statistics thanks, matt ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

[Numpy-discussion] genfromtxt behaviour

2010-10-29 Thread Matt Studley
er! So I would need to get the dtype object... myData[ myData.dtype.names[0] ] in order to index by column. Matt ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

[Numpy-discussion] genfromtxt behaviour

2010-10-29 Thread Matt Studley
Hi all first, please forgive me for my ignorance - I am taking my first stumbling steps with numpy and scipy. I am having some difficulty with the behaviour of genfromtxt. s = SIO.StringIO("""1, 2, 3 4, 5, 6 7, 8, 9""") g= genfromtxt(s, delimiter=', ', dtype=None) print g[:,0] This produces th

Re: [Numpy-discussion] calling C function from Python via f2py

2010-05-25 Thread Matt Fearon
ython for this purpose. > >   Nadav > > -Original Message- > From: numpy-discussion-boun...@scipy.org on behalf of Matt Fearon > Sent: Mon 24-May-10 15:43 > To: Discussion of Numerical Python > Subject: Re: [Numpy-discussion] calling C function from Python via f2py >

Re: [Numpy-discussion] calling C function from Python via f2py

2010-05-24 Thread Matt Fearon
,Fo) Should this execute the C code? thanks, Matt On Sun, May 23, 2010 at 1:44 AM, Nadav Horesh wrote: > > in test.py change to > > print FFMCcalc.FFMCcalc(T,H,W,ro,Fo) > > As implied from the line > > print FFMCcalc.FFMCcalc.__doc__ > >  Nadav > >

[Numpy-discussion] calling C function from Python via f2py

2010-05-21 Thread Matt Fearon
tax is: f2py -c -lm FFMCcalc.pyf FFMCcalc.c Also, my 3 scripts are short and attached. 1. FFMCcalc.c, C function 2. FFMCcalc.pyf, wrapper file 3. test.py, short python code that calls C function Any advice would greatly appreciated to get this working. thanks, Matt double FFMCcalc(double T

Re: [Numpy-discussion] Subclassing ma.MaskedArray

2010-03-16 Thread Matt Knox
at the TimeSeries class in the scikits.timeseries module for a rather extensive example of subclassing MaskedArray - Matt ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] C-api and masked arrays

2010-03-01 Thread Matt Knox
some ideas. All the code that deals with masked arrays is located here: http://svn.scipy.org/svn/scikits/trunk/timeseries/scikits/timeseries/src/c_tseries .c The functions that deal with frequency conversion and calculating moving sums, averages, etc all dea

Re: [Numpy-discussion] add xirr to numpy financial functions?

2009-05-25 Thread Matt Knox
cel probably seems about right. Although maybe it is more appropriate for scipy than numpy. - Matt ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] add xirr to numpy financial functions?

2009-05-25 Thread Matt Knox
ionality (which is probably an impossible task realistically). - Matt ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Are masked arrays slower for process ing than ndarrays?

2009-05-13 Thread Matt Knox
ile this doesn't affect me personally... I wonder if everyone is aware of this. Importing modules generally shouldn't have side effects either I would think. Has this always been the case for the masked array module? - Matt ___ Numpy-discussi

Re: [Numpy-discussion] Are masked arrays slower for process ing than ndarrays?

2009-05-13 Thread Matt Knox
np.seterr(divide='ignore',invalid='ignore') before calling the ufunc This isn't a thread safe approach and could cause wierd side effects in a multi-threaded application. I think modifying global options/variables inside any function where it generally would

Re: [Numpy-discussion] The date/time dtype and the casting issue

2008-07-30 Thread Matt Knox
>> >> If it's really just weekdays why not call it that instead of using a >> >> term like business days that (quite confusingly) suggests holidays >> >> are handled properly? >> >> Well, we were adopting the name from the TimeSeries package. Perhaps >> the authors can answer this better than me.

Re: [Numpy-discussion] RFC: A (second) proposal for i mplementing some date/time types in NumPy

2008-07-25 Thread Matt Knox
7;ll be able to help much on the initial implementation, but once you have a framework in place I may be able to pitch in with some of the details. Please keep us posted. - Matt ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] NumPy date/time types and the resolu tion concept

2008-07-16 Thread Matt Knox
re and it works amazingly well, then I'd probably get on board. I just think that may be difficult to do with a general purpose date dtype suitable for inclusion in the numpy core. - Matt ___ Numpy-discussion mailing list Numpy-discussion@scipy

Re: [Numpy-discussion] RFC: A proposal for implementing s ome date/time types in NumPy

2008-07-12 Thread Matt Knox
using the built in parser in the timeseries module (borrowed from mx.DateTime). Observe... >>> dlist = ['14-jan-2001 14:34:33', '16-jan-2001 10:09:11'] >>> a = ts.date_array(dlist, freq='secondly') >>> a DateArray([14-Jan-2001

[Numpy-discussion] SphinxDocString class in new numpy doc framework

2008-06-29 Thread Matt Knox
em in with your .rst files similar to how the autodoc sphinx extension works (rather than just pre-generating a big dump of all the doc strings into a single .rst file). This is probably a question more for the sphinx mailing list, but I thought I'd ask while I'm on the topic in case

Re: [Numpy-discussion] numpy.test() (failures=2, errors=3)

2008-05-24 Thread Matt Knox
ats has long since been deleted from svn. Try wiping out your numpy installation and starting from scratch. - Matt ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Outputting arrays.

2008-05-21 Thread Matt Knox
numbers). If you need more detail, let me know and I can make a fuller example. - Matt ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] 1.1.0rc1, Win32 Installer: please test it (test errors)

2008-05-21 Thread Matt Knox
> installed fine and all tests ran successfully on my machine. I spoke too soon. I didn't know about the "all" parameter in numpy.test and just ran if with the default before. When I specify all=True, I get 12 errors. Most of which seem to be related to a problem with calling the "tolist" method.

Re: [Numpy-discussion] 1.1.0rc1, Win32 Installer: please test it

2008-05-20 Thread Matt Knox
David Cournapeau ar.media.kyoto-u.ac.jp> writes: > > Hi, > > Sorry for the delay, but it is now ready: numpy "superpack" > installers for numpy 1.1.0rc1: > > http://www.ar.media.kyoto-u.ac.jp/members/david/archives/numpy-1.1.0rc1-win32-superpack-python2.5.exe > http://www.ar.media.kyoto-u

Re: [Numpy-discussion] Numpify this?

2008-05-18 Thread Matt Crane
On Sun, May 18, 2008 at 9:14 PM, Anne Archibald <[EMAIL PROTECTED]> wrote: > 2008/5/18 Matt Crane <[EMAIL PROTECTED]>: >> On Sun, May 18, 2008 at 8:52 PM, Robert Kern <[EMAIL PROTECTED]> wrote: >>> Are there repeats? >> No, no repeats in the first column.

Re: [Numpy-discussion] Numpify this?

2008-05-18 Thread Matt Crane
to leave out any potentially vital information again. It's going to be a long day. Thanks, Matt ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Numpify this?

2008-05-18 Thread Matt Crane
he first column are monotonically increasing (again something I should have mentioned -- I blame a lack of caffeine) - could we make it faster? Thanks, for everything up to this point though. Matt ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http:/

Re: [Numpy-discussion] Numpify this?

2008-05-18 Thread Matt Crane
On Sun, May 18, 2008 at 7:19 PM, Robert Kern <[EMAIL PROTECTED]> wrote: > Are the matching rows always going to be the same row in each? I.e. > you want rows i such that a[i,0]==b[i,0] rather than trying to find > all i,j such that a[i,0]==b[j,0]? > > If so, then I would do the following: > > > In

[Numpy-discussion] Numpify this?

2008-05-18 Thread Matt Crane
aind += 1 elif a[aind, 0] > b[bind, 0]: bind += 1 else: results.append([a[aind, 1], b[bind, 1]]) aind += 1 bind += 1 results = array(results) Where aind = bind = 0, amax = a.shape[0] and bmax = b.shape

Re: [Numpy-discussion] bug with with fill_values in maske d arrays?

2008-03-21 Thread Matt Knox
(as far as I know) by design, and makes sense to me at least. If you disagree with some of the above behaviour, then I'm sure people would be happy to hear your opinion, but it is incorrect to flatly call this a bug. - Matt ___ Numpy-discussion ma

Re: [Numpy-discussion] bug with with fill_values in maske d arrays?

2008-03-19 Thread Matt Knox
in the data portion of the masked array, but the old version perhaps doesn't based on the output you are showing. > > 2. why is the wrong fill value being used here? the second element in the array iteration here is actually the numpy.ma.masked constant, which always has the same fill valu

[Numpy-discussion] location of ma in maskedarray branch

2008-01-22 Thread Matt Knox
I noticed that the new masked array module resides in numpy/ma in the maskedarray branch as opposed to numpy/core/ma like it does in the current trunk. Was this intentional? Code that explicitly imports ma from the core subfolder will break from this change (like the __init__.py script for the

Re: [Numpy-discussion] trailing max

2007-10-30 Thread Matt Knox
eries package in the scipy SVN ? We (Matt Knox > and I) tried to address some of these issues for environmental and financial > time series. > http://www.scipy.org/SciPyPackages/TimeSeries > I have just added a trailing max and trailing min function to the timeseries package to g

Re: [Numpy-discussion] Maskedarray implementations

2007-08-25 Thread Matt Knox
mpy.ma anyway, but I suspect some people might have a problem with that. So what is the best way to do this? - Matt ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] [SciPy-user] median filter with clipping

2007-05-17 Thread Matt Knox
quick to implement fixes for. The fact that it works seamlessly as a drop in replacement in matplotlib is a good sign as far as backwards compatibility. - Matt ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] pretty printing record array element - datetime

2007-05-15 Thread Matt Knox
er, as well as "pretty printing" (and plotting). There is also a sub-module in the package for record array TimeSeries objects of sorts... but Pierre would be more qualified to talk about that than me. We LOVE getting new testers and feedback, so if you'

Re: [Numpy-discussion] Big list of Numpy & Scipy users

2007-04-09 Thread Matt Knox
Heading == instead of Heading ). And perhaps for applications where it isn't entirely obvious what it does based on the name, a brief (less than one line) description in brackets beside the heading? (eg. "Inkscape (vector graphics editor)") I'm not a professional wiki

[Numpy-discussion] thread safe subclasses of ndarray

2007-02-06 Thread Matt Knox
perts on this list would be able to shed some light on a good way to create thread safe subclasses of ndarray. Thanks, - Matt Knox___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] classmethods for ndarray

2007-02-02 Thread Matt Knox
ing about these kinds of issues in the future. - Matt ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] ANN: MaskedArray as a subclass of ndarray -?followup

2007-01-19 Thread Matt Knox
peed critical parts in C would still be a nice improvement. - Matt ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] ANN: MaskedArray as a subclass of ndarray - followup

2007-01-19 Thread Matt Knox
ut the example script isn't fully updated to reflect the latest code either. If you do play around with it though, I would love to hear your thoughts on it and any criticisms/suggestions you may have. - Matt ___ Numpy-discussion mailin

Re: [Numpy-discussion] ANN: MaskedArray as a subclass of ndarray - followup

2007-01-18 Thread Matt Knox
> This makes sense to me. I'm generally favorable to the new maskedarray > (I actually like the idea of it being a sub-class). I'm just waiting > for people that actually use the MaskedArray to comment. > > For 1.1 I would really like to move most of the often-used sub-classes > of the ndarr

Re: [Numpy-discussion] custom accumlators

2007-01-05 Thread Matt Knox
s the brute force way of doing it. And I think the code looks a little nicer too which is always nice. Definitely a technique I will be using in the future. - Matt ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] custom accumlators

2007-01-05 Thread Matt Knox
assed to it, that would be super slick... but that is probably a few leaps beyond my current knowledge level to code that. Thanks again everybody, - Matt ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] custom accumlators

2007-01-05 Thread Matt Knox
> > On Friday 05 of January 2007 17:42, Matt Knox wrote: > > - > > Example 1 - exponential moving average: > > > > # naive brute force method... > > def expmave(x, k): > > result = numpy.array(x, copy=T

[Numpy-discussion] custom accumlators

2007-01-05 Thread Matt Knox
--- Is their a good way to do these kinds of things without python looping? Or is that going to require writing a ufunc in C? Any help is greatly appreciated. Thanks, - Matt Knox ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://p

[Numpy-discussion] efficient way to get first index of first masked/non-masked value in a masked array

2006-12-01 Thread Matt Knox
all I can come up with is dumb brute force methods by iterating through all the values. Anyone got any tricks I can use? Thanks, - Matt Knox ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo