Re: [Numpy-discussion] proposal: min, max of complex should give warning

2013-12-31 Thread Cera, Tim
I don't work with complex numbers, but just sampling what others do: Python: no ordering, results in TypeError Matlab: sorts by magnitude http://www.mathworks.com/help/matlab/ref/sort.html R: sorts first by real, then by imaginary

Re: [Numpy-discussion] PEP8

2013-09-09 Thread Cera, Tim
I made a PR request about supplying a git hooks framework at https://github.com/numpy/numpy/pull/200. I asked for it to be closed because I couldn't easily figure our how to handle x-platform issues. If you have an answer, what I was working on might be a start. But your script is an example of

Re: [Numpy-discussion] (no subject)

2013-09-03 Thread Cera, Tim
I am trying to take the rfft of a numpy array, like this: my_rfft = numpy.fft.rfft(my_numpy_array) and replace the amplitudes that can be obtained with: my_amplitudes = numpy.abs(my_rfft) with amplitudes from an arbitrary numpy array's rFFT, which is to then be converted back using

[Numpy-discussion] Strange behavior with boolean slices...

2013-08-25 Thread Cera, Tim
I have done this before, but am now really confused. Created an array 'day' specifying the 'f' type In [29]: day Out[29]: array([ 5., 5.], dtype=float32) # Have a mask... In [30]: mask Out[30]: array([ True, False], dtype=bool) # So far, so good... In [31]: day[mask] Out[31]: array([ 5.],

Re: [Numpy-discussion] Strange behavior with boolean slices...

2013-08-25 Thread Cera, Tim
25, 2013 at 8:44 PM, Eric Firing efir...@hawaii.edu wrote: On 2013/08/25 2:30 PM, Cera, Tim wrote: I have done this before, but am now really confused. Created an array 'day' specifying the 'f' type In [29]: day Out[29]: array([ 5., 5.], dtype=float32) # Have a mask... In [30]: mask Out

Re: [Numpy-discussion] Strange behavior with boolean slices...

2013-08-25 Thread Cera, Tim
Pardon the noise. The behavior is described right there in the documentation of broadcast_arrays. Kindest regards, Tim On Sun, Aug 25, 2013 at 8:53 PM, Cera, Tim t...@cerazone.net wrote: Figured it out. I created 'day' as a broadcast array. Does this catch other people? Basically changing

Re: [Numpy-discussion] Deprecation of financial routines

2013-08-19 Thread Cera, Tim
On Mon, Aug 19, 2013 at 2:37 AM, Juan Luis Cano juanlu...@gmail.com wrote: As now master is open for 1.9, following the discussion opened here https://github.com/numpy/numpy/issues/2880 it was suggested that we deprecate and eventually remove the financial functions in NumPy, because they

Re: [Numpy-discussion] Is there a way to reset an accumulate function?

2012-10-24 Thread Cera, Tim
On Wed, Oct 24, 2012 at 4:47 AM, Robert Kern robert.k...@gmail.com wrote: How about this? def nancumsum(x): nans = np.isnan(x) x = np.array(x) x[nans] = 0 reset_idx = np.zeros(len(x), dtype=int) reset_idx[nans] = np.arange(len(x))[nans] reset_idx =

[Numpy-discussion] Is there a way to reset an accumulate function?

2012-10-23 Thread Cera, Tim
I have an array that is peppered throughout in random spots with 'nan'. I would like to use 'cumsum', but I want it to reset the accumulation to 0 whenever a 'nan' is encountered. Is there a way to do this? Aside from a loop - which is what I am going to setup here in a moment. Kindest

Re: [Numpy-discussion] [numpy] ENH: Initial implementation of a 'neighbor' calculation (#303)

2012-10-15 Thread Cera, Tim
On Sun, Oct 14, 2012 at 8:24 PM, Zachary Pincus zachary.pin...@yale.eduwrote: It would be useful for the author of the PR to post a detailed comparison of this functionality with scipy.ndimage.generic_filter, which appears to have very similar functionality. I'll be durned. I created

Re: [Numpy-discussion] Fwd: [numpy] ENH: Initial implementation of a 'neighbor' calculation (#303)

2012-10-12 Thread Cera, Tim
For the neighbor module, the neighborhood is input specified by the 'weight' array. All values in the neighborhood are processed by a function. In the geosciences, ArcGIS is a very important tool and the neighbor module is very loosely modeled after

Re: [Numpy-discussion] Fwd: [numpy] ENH: Initial implementation of a 'neighbor' calculation (#303)

2012-10-12 Thread Cera, Tim
If you followed the link http://webhelp.esri.com/arcgisdesktop/9.2/index.cfm?TopicName=An%20overview%20of%20the%20Neighborhood%20tools note that the current neighborhood implementation that we are talking about implements the ArcGIS 'Focal*' functionality, not the 'Block*' ones. Note also that

Re: [Numpy-discussion] Fwd: [numpy] ENH: Initial implementation of a 'neighbor' calculation (#303)

2012-10-10 Thread Cera, Tim
On Wed, Oct 10, 2012 at 1:58 AM, Travis E. Oliphant notificati...@github.com wrote: I'm not sure what to make of no comments on this PR. This seems like a useful addition. @timcera https://github.com/timcera are you still interested in having this PR merged? Yes. I mentioned in PR comments

Re: [Numpy-discussion] Multidimensional neighbours

2012-08-16 Thread Cera, Tim
I have a pull request for a neighborhood function at https://github.com/numpy/numpy/pull/303 . I think IMHO it handles these problems quite handily. It does rely on my pad routine that is in Numpy 1.7, so you would need to get the 1.7 beta installed or install the development branch. For your

Re: [Numpy-discussion] Looking for the most important bugs, documentation needs, etc.

2012-07-10 Thread Cera, Tim
For documentation we have docstrings for each function and tutorial-style docs (http://docs.scipy.org/doc/numpy/user/, http://scipy-lectures.github.com/intro/numpy/index.html) . All docstrings should have clear usage examples, but I'm actually finding it quite hard to find functions that

Re: [Numpy-discussion] Meta: help, devel and stackoverflow

2012-06-28 Thread Cera, Tim
Similar to http://scicomp.stackexchange.com there is http://meta.programmers.stackexchange.com/ intended for programmers. Darn it, there are choices involved! I had proposed http://meta.programmers.stackexchange.com/ on this mailing list earlier and no-one seemed interested, but maybe now the

Re: [Numpy-discussion] Meta: help, devel and stackoverflow

2012-06-28 Thread Cera, Tim
You are correct, I meant http://programmers.stackexchange.com/ And on a site like stackexchange I could actually edit my post instead of my mistake being permanent. :-) Kindest regards, Tim ___ NumPy-Discussion mailing list

Re: [Numpy-discussion] Meta: help, devel and stackoverflow

2012-06-28 Thread Cera, Tim
A little more research shows that we could have a http://numpy.stackexchange.com. The requirements are just to have people involved. See http://area51.stackexchange.com/faq for more info. Kindest regards, Tim ___ NumPy-Discussion mailing list

Re: [Numpy-discussion] Meta: help, devel and stackoverflow

2012-06-28 Thread Cera, Tim
That is really funny. Looking through the posts, there wasn't any spam (could have been deleted), but it wasn't used as much as I would think. Have to attract people who answer questions. Early on the registration seemed to be a problem. Solace, the software behind ask.scipy.org looks pretty