Re: [Numpy-discussion] Added atleast_nd, request for clarification/cleanup of atleast_3d

2016-07-06 Thread Eric Firing
On 2016/07/06 8:25 AM, Benjamin Root wrote: I wouldn't have the keyword be "where", as that collides with the notion of "where" elsewhere in numpy. Agreed. Maybe "side"? (I find atleast_1d and atleast_2d to be very helpful for handling inputs, as Ben noted; I'm skeptical as to the value of

Re: [Numpy-discussion] Question about nump.ma.polyfit

2015-12-15 Thread Eric Firing
On 2015/12/14 6:39 PM, Samuel Dupree wrote: I'm running Python 2.7.11 from the Anaconda distribution (version 2.4.1) on a MacBook Pro running Mac OS X version 10.11.2 (El Capitan) I'm attempting to use numpy.ma.polyfit to perform a linear least square fit on some data I have. I'm running NumPy

Re: [Numpy-discussion] Recognizing a cycle in a vector

2015-12-03 Thread Eric Firing
On 2015/12/02 10:45 PM, Manolo Martínez wrote: 1) this func sorts the absolute value of the amplitudes to find the two most important components, and this seems overkill for large vectors. Try inds = np.argpartition(-np.abs(ft), 2)[:2] Now inds holds the indices of the two largest

Re: [Numpy-discussion] When to stop supporting Python 2.6?

2015-12-03 Thread Eric Firing
On 2015/12/03 12:47 PM, Charles R Harris wrote: Hi All, Thought I would raise the topic apropos this post . There is not a great advantage to dropping 2.6, OTOH, 2.7 has more features (memoryview) and we could clean

Re: [Numpy-discussion] future of f2py and Fortran90+

2015-12-03 Thread Eric Firing
, Sturla Molden <sturla.mol...@gmail.com> wrote: Eric Firing <efir...@hawaii.edu> wrote: I'm curious: has anyone been looking into what it would take to enable f2py to handle modern Fortran in general? And into prospects for getting such an effort funded? No need. Use Cython and Fort

Re: [Numpy-discussion] Feedback on new argument positions for ma.dot and MaskedArray.dot

2015-11-08 Thread Eric Firing
On 2015/11/08 3:46 PM, Charles R Harris wrote: Hi All, I'd like some feedback for the position of the `strict` and `out` arguments for masked arrays. See gh-6653 for the PR in question. Current status without #6652 1. ma.dot(a, b, strict=False) --

Re: [Numpy-discussion] Problem while writing array with np.savetxt

2015-09-24 Thread Eric Firing
On 2015/09/23 9:17 PM, Andrew Nelson wrote: Dear list, whilst trying to write an array to disk I am coming across the following. What am I doing wrong? Surely f is a file handle? (python 3.4.3, numpy 1.9.2) import numpy as np a = np.arange(10.) with open('test.dat', 'w') as f:

Re: [Numpy-discussion] Comments on governance proposal (was: Notes from the numpy dev meeting at scipy 2015)

2015-09-04 Thread Eric Firing
On 2015/09/04 10:53 AM, Matthew Brett wrote: > On Fri, Sep 4, 2015 at 2:33 AM, Matthew Brett wrote: >> Hi, >> >> On Wed, Sep 2, 2015 at 5:41 PM, Chris Barker wrote: >>> 1) I very much agree that governance can make or break a project. However, >>>

Re: [Numpy-discussion] Numpy FFT.FFT slow with certain samples

2015-08-28 Thread Eric Firing
On 2015/08/28 10:36 AM, Sebastian Berg wrote: If you don't mind the extra dependency or licensing and this is an issue for you, you can try pyfftw (there are likely other similar projects) which wraps fftw and does not have this problem as far as I know. It exposes a numpy-like interface.

Re: [Numpy-discussion] Problems using add_npy_pkg_config

2015-08-12 Thread Eric Firing
I used to use scons, but I've been pretty happy with switching to waf. (Very limited use in both cases: two relatively simple packages.) One of the nicest things is how light it is--no external dependencies, everything can be included in the package itself.

[Numpy-discussion] future of f2py and Fortran90+

2015-07-14 Thread Eric Firing
F2py is a great tool, but my impression is that it is being left behind by the evolution of Fortran from F90 onward. This is unfortunate; it would be nice to be able to easily wrap new Fortran libraries. I'm curious: has anyone been looking into what it would take to enable f2py to handle

Re: [Numpy-discussion] On responding to dubious ideas (was: Re: Advanced indexing: fancy vs. orthogonal)

2015-04-08 Thread Eric Firing
On 2015/04/08 8:09 AM, Alan G Isaac wrote: That analogy fails because it suggests a private conversation. This list is extremely public. For example, I am just a user, and I am on it. I can tell you that as a long-time numpy user my reaction to the proposal to change indexing semantics was

Re: [Numpy-discussion] On responding to dubious ideas (was: Re: Advanced indexing: fancy vs. orthogonal)

2015-04-08 Thread Eric Firing
On 2015/04/08 9:40 AM, Ralf Gommers wrote: Their proposal is not being discussed; instead that potentially useful discussion is being completely derailed by insisting on wanting to talk about changes to numpy's indexing behavior. Good point. That was an unintended consequence of my message.

Re: [Numpy-discussion] On responding to dubious ideas (was: Re: Advanced indexing: fancy vs. orthogonal)

2015-04-08 Thread Eric Firing
On 2015/04/08 10:02 AM, Alan G Isaac wrote: 3. I admit, my students are NOT using non-boolen fancy indexing on multidimensional arrays. (As far as I know.) Are yours? Yes, one attempted to, essentially by accident. That was in my original message. Please refer back to that. The earlier

Re: [Numpy-discussion] Advanced indexing: fancy vs. orthogonal

2015-04-03 Thread Eric Firing
On 2015/04/03 7:59 AM, Jaime Fernández del Río wrote: I have an all-Pyhton implementation of an OrthogonalIndexer class, loosely based on Stephan's code plus some axis remapping, that provides all the needed functionality for getting and setting with orthogonal indices. Excellent! Would

Re: [Numpy-discussion] Advanced indexing: fancy vs. orthogonal

2015-04-02 Thread Eric Firing
On 2015/04/02 10:22 AM, josef.p...@gmail.com wrote: Swapping the axis when slices are mixed with fancy indexing was a design mistake, IMO. But not fancy indexing itself. I'm not saying there should be no fancy indexing capability; I am saying that it should be available through a function or

Re: [Numpy-discussion] Advanced indexing: fancy vs. orthogonal

2015-04-02 Thread Eric Firing
On 2015/04/02 1:14 PM, Hanno Klemm wrote: Well, I have written quite a bit of code that relies on fancy indexing, and I think the question, if the behaviour of the [] operator should be changed has sailed with numpy now at version 1.9. Given the amount packages that rely on numpy, changing

Re: [Numpy-discussion] Advanced indexing: fancy vs. orthogonal

2015-04-02 Thread Eric Firing
On 2015/04/02 4:15 AM, Jaime Fernández del Río wrote: We probably need more traction on the should this be done? discussion than on the can this be done? one, the need for a reordering of the axes swings me slightly in favor, but I mostly don't see it yet. As a long-time user of numpy, and an

Re: [Numpy-discussion] Rewrite np.histogram in c?

2015-03-23 Thread Eric Firing
On 2015/03/23 7:36 AM, Ralf Gommers wrote: On Mon, Mar 23, 2015 at 2:59 PM, Daniel da Silva var.mail.dan...@gmail.com mailto:var.mail.dan...@gmail.com wrote: Hope this isn't too off-topic: but it would be very nice if np.histogram and np.histogram2d supported masked arrays. Is this

Re: [Numpy-discussion] Fix masked arrays to properly edit views

2015-03-14 Thread Eric Firing
On 2015/03/14 1:02 PM, John Kirkham wrote: The sample case of the issue ( https://github.com/numpy/numpy/issues/5558 ) is shown below. A proposal to address this behavior can be found here ( https://github.com/numpy/numpy/pull/5580 ). Please give me your feedback. I tried to change the mask

Re: [Numpy-discussion] numpy pickling problem - python 2 vs. python 3

2015-03-06 Thread Eric Firing
On 2015/03/06 1:29 PM, Julian Taylor wrote: I think the ship for a warning has long sailed. At this point its probably more an annoyance for python3 users and will not prevent many more python2 users from saving files that can't be loaded into python3. The point of a warning is that anything

Re: [Numpy-discussion] numpy pickling problem - python 2 vs. python 3

2015-03-06 Thread Eric Firing
On 2015/03/06 10:23 AM, Pauli Virtanen wrote: 06.03.2015, 20:00, Benjamin Root kirjoitti: A slightly different way to look at this is one of sharing data. If I am working on a system with 3.4 and I want to share data with others who may be using a mix of 2.7 and 3.3 systems, this problem makes

Re: [Numpy-discussion] Silent Broadcasting considered harmful

2015-02-08 Thread Eric Firing
On 2015/02/08 12:43 PM, josef.p...@gmail.com wrote: For me the main behavior I had to adjust to was loosing a dimension in any reduce operation, mean, sum, ... if x is 2d x - x.mean(1) we loose a dimension, and it doesn't broadcast in the right direction Though you can use: x_demeaned =

Re: [Numpy-discussion] Datetime again

2015-01-28 Thread Eric Firing
On 2015/01/28 6:29 PM, Charles R Harris wrote: And as for The 64 bits of long long really isn't enough and leads to all sorts of compromises. not long enough for what? I've always thought that what we need is the ability to set the epoch. Does anyone ever need picoseconds

Re: [Numpy-discussion] EDF+ specification

2015-01-20 Thread Eric Firing
Nathaniel, I don't know what sequence of wrong button pushes led to this, but the message was intended for Io Flament. Sorry for the puzzling disruption! Eric On 2015/01/20 1:17 PM, Nathaniel Smith wrote: On Tue, Jan 20, 2015 at 10:51 PM, Eric Firing efir...@hawaii.edu wrote: http

[Numpy-discussion] EDF+ specification

2015-01-20 Thread Eric Firing
http://www.edfplus.info/specs/edfplus.html#additionalspecs Io, Is this the file format you have? Eric ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Detect if array has been transposed

2014-10-12 Thread Eric Firing
On 2014/10/12, 8:29 AM, Pauli Virtanen wrote: 12.10.2014, 20:19, Mads Ipsen kirjoitti: Is there any way for me to detect (on the Python side) that transpose() has been invoked on the matrix, and thereby only do the copy operation when it really is needed? The correct way to do this is to,

Re: [Numpy-discussion] Numpy 'None' comparison FutureWarning

2014-09-21 Thread Eric Firing
On 2014/09/21, 11:10 AM, Demitri Muna wrote: Hi, I just encountered the following in my code: FutureWarning: comparison to `None` will result in an elementwise object comparison in the future. I'm very concerned about this. This is a very common programming pattern (lazy loading): class

Re: [Numpy-discussion] Short-hand array creation in `numpy.mat` style

2014-07-06 Thread Eric Firing
On 2014/07/06, 11:43 AM, Nathaniel Smith wrote: On Sun, Jul 6, 2014 at 9:35 PM, Daniel da Silva var.mail.dan...@gmail.com wrote: The idea is that there be a short-hand for creating arrays as there is for matrices: np.mat('.2 .7 .1; .3 .5 .2; .1 .1 .9') It was suggested in GitHub issue

Re: [Numpy-discussion] Short-hand array creation in `numpy.mat` style

2014-07-06 Thread Eric Firing
On 2014/07/06, 4:27 PM, Alexander Belopolsky wrote: On Sun, Jul 6, 2014 at 6:06 PM, Eric Firing efir...@hawaii.edu mailto:efir...@hawaii.edu wrote: (I'm not entirely convinced np.arr() is a good idea at all; but if it is, it must be kept simple.) If you are going to introduce

Re: [Numpy-discussion] segfault from scipy.io.netcdf with scipy-0.14 numpy-0.18

2014-05-08 Thread Eric Firing
On 2014/05/07 11:26 PM, Robert McGibbon wrote: Hey all, The travis tests for a library I work on just stopped working, and I tracked down the bug to the following test case. The file MDTraj/testing/reference/mdcrd.nc http://mdcrd.nc is a netcdf3 file in our repository

Re: [Numpy-discussion] List of arrays failing index(), remove() etc

2014-05-07 Thread Eric Firing
On 2014/05/07 2:14 PM, mfm24 wrote: I'm having a problem I haven't seen elsewhere (and apologies if it has been answered before). I see the following behavior (copied verbatim from a python session): Python 2.7.4 (default, Apr 6 2013, 19:55:15) [MSC v.1500 64 bit (AMD64)] on win32 Type

Re: [Numpy-discussion] Resolving the associativity/precedence debate for @

2014-03-22 Thread Eric Firing
On 2014/03/22 8:13 AM, Nathaniel Smith wrote: Hi all, After 88 emails we don't have a conclusion in the other thread (see [1] for background). But we have to come to some conclusion or another if we want @ to exist:-). So I'll summarize where the discussion stands and let's see if we can

Re: [Numpy-discussion] python array

2014-03-14 Thread Eric Firing
On 2014/03/13 9:09 PM, Sudheer Joseph wrote: Dear Oslen, I had a detailed look at the example you send and points I got were below a = np.arange(-8, 8).reshape((4, 4)) b = ma.masked_array(a, mask=a 0) Out[33]: b[b4] masked_array(data = [-- -- -- -- -- -- -- -- 0 1 2 3],

Re: [Numpy-discussion] surprising behavior of np.asarray on masked arrays

2013-12-05 Thread Eric Firing
On 2013/12/05 5:14 PM, Faraz Mirzaei wrote: Hi, If I pass a masked array through np.asarray, I get original unmasked array. Example: test = np.array([[1, 0], [-1, 3]]) testMasked = ma.masked_less_equal(test, 0) print testMasked [[1 --] [-- 3]] print testMasked.fill_value

Re: [Numpy-discussion] Masked arrays: Rationale for False convention

2013-09-30 Thread Eric Firing
On 2013/09/30 4:05 PM, josef.p...@gmail.com wrote: On Mon, Sep 30, 2013 at 9:38 PM, Charles R Harris charlesr.har...@gmail.com wrote: On Mon, Sep 30, 2013 at 7:05 PM, Ondřej Čertík ondrej.cer...@gmail.com wrote: Hi, What is the rationale for using False in 'mask' for elements that

Re: [Numpy-discussion] Masked arrays: Rationale for False convention

2013-09-30 Thread Eric Firing
On 2013/09/30 4:57 PM, Ondřej Čertík wrote: On Mon, Sep 30, 2013 at 8:29 PM, Eric Firing efir...@hawaii.edu wrote: On 2013/09/30 4:05 PM, josef.p...@gmail.com wrote: On Mon, Sep 30, 2013 at 9:38 PM, Charles R Harris charlesr.har...@gmail.com wrote: On Mon, Sep 30, 2013 at 7:05 PM, Ondřej

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

2013-08-25 Thread Eric Firing
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[30]: array([ True, False], dtype=bool) # So far, so

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

2013-08-25 Thread Eric Firing
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[30]: array([ True, False], dtype=bool) # So far, so

Re: [Numpy-discussion] strange behavior of variable

2013-08-18 Thread Eric Firing
On 2013/08/17 9:49 PM, Sudheer Joseph wrote: Hi, I have defined a small function to find the n maximum values of an array as below. With in it I assign the input array to a second array and temporarily make the array location after first iteration as nan. I expected this temporary

[Numpy-discussion] bug fixes: which branch?

2013-06-16 Thread Eric Firing
What is the preferred strategy for handling bug fix PRs? Initial fix on master, and then a separate PR to backport to v1.7.x? Or the reverse? It doesn't look like v1.7.x is being merged into master regularly, so the matplotlib pattern (fix on maintenance, merge maintenance into master) seems

[Numpy-discussion] please close 611, 629, 2490, 2264

2013-06-16 Thread Eric Firing
Github issues 611, 629, and 2490 are duplicates. 611 included patches with a test and a fix, both of which were committed long ago, so all three issues should be closed. Please see my comment on 2264 as to why that should be closed. On 1417, please remove the component:numpy.ma label and add

Re: [Numpy-discussion] saving 3d array

2013-06-15 Thread Eric Firing
On 2013/06/15 6:06 AM, Pierre GM wrote: On Jun 15, 2013, at 17:35 , Matthew Brett matthew.br...@gmail.com wrote: Hi, On Sat, Jun 15, 2013 at 2:51 PM, Sudheer Joseph sudheer.jos...@yahoo.com wrote: Thank you very much for this tip. Is there a typical way to save masked and the rest

Re: [Numpy-discussion] numpy.filled, again

2013-06-14 Thread Eric Firing
On 2013/06/14 5:15 AM, Alan G Isaac wrote: On 6/14/2013 9:27 AM, Aldcroft, Thomas wrote: If I just saw np.values(..) in some code I would never guess what it is doing from the name That suggests np.fromvalues. But more important than the name I think is allowing broadcasting of the values,

[Numpy-discussion] NA, and replacement or reimplimentation of np.ma

2013-06-14 Thread Eric Firing
On 2013/06/14 7:22 AM, Nathaniel Smith wrote: On Wed, Jun 12, 2013 at 7:43 PM, Eric Firing efir...@hawaii.edu wrote: On 2013/06/12 2:10 AM, Nathaniel Smith wrote: Personally I think that overloading np.empty is horribly ugly, will continue confusing newbies and everyone else indefinitely

[Numpy-discussion] time to revisit NA/ma ideas

2013-06-14 Thread Eric Firing
A nice summary of the discussions from a year ago is here: http://www.numpy.org/NA-overview.html It provides food for thought. Eric ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] numpy.filled, again

2013-06-13 Thread Eric Firing
On 2013/06/13 10:36 AM, Benjamin Root wrote: On Thu, Jun 13, 2013 at 9:36 AM, Aldcroft, Thomas aldcr...@head.cfa.harvard.edu mailto:aldcr...@head.cfa.harvard.edu wrote: On Wed, Jun 12, 2013 at 2:55 PM, Eric Firing efir...@hawaii.edu mailto:efir...@hawaii.edu wrote

Re: [Numpy-discussion] numpy.filled, again

2013-06-12 Thread Eric Firing
On 2013/06/12 2:10 AM, Nathaniel Smith wrote: Hi all, It looks like we've gotten a bit confused and need to untangle something. There's a PR to add new functions 'np.filled' and 'np.filled_like': https://github.com/numpy/numpy/pull/2875 And there was a discussion about this on the list

Re: [Numpy-discussion] numpy.filled, again

2013-06-12 Thread Eric Firing
On 2013/06/12 4:18 AM, Nathaniel Smith wrote: Now imagine a different new version of this page, if we overload 'empty' to add a fill= option. I don't even know how we document that on this page. The list will remain: empty ones zeros Opposite of empty: full. So that is another

Re: [Numpy-discussion] numpy.filled, again

2013-06-12 Thread Eric Firing
On 2013/06/12 8:13 AM, Warren Weckesser wrote: That's why I suggested 'filledwith' (add the underscore if you like). This also allows a corresponding masked implementation, 'ma.filledwith', without clobbering the existing 'ma.filled'. Consensus on np.filled? absolutely not, you do not have a

Re: [Numpy-discussion] empty_like for masked arrays

2013-06-10 Thread Eric Firing
On 2013/06/10 10:17 AM, Aldcroft, Thomas wrote: I use np.ma http://np.ma, and for me the most intuitive would be the second option where the new array matches the original array in shape and dtype, but always has an empty mask. I always think of the *_like() functions as just copying shape

Re: [Numpy-discussion] suggested change of behavior for interp

2013-06-04 Thread Eric Firing
On 2013/06/04 2:05 PM, Charles R Harris wrote: On Tue, Jun 4, 2013 at 12:07 PM, Slavin, Jonathan jsla...@cfa.harvard.edu mailto:jsla...@cfa.harvard.edu wrote: Hi, I would like to suggest that the behavior of numpy.interp be changed regarding treatment of situations in which

Re: [Numpy-discussion] suggested change of behavior for interp

2013-06-04 Thread Eric Firing
think might reasonably be an option but that should not be required. Eric I have been bitten by this problem too. Cheers! Ben Root On Jun 4, 2013 9:08 PM, Eric Firing efir...@hawaii.edu mailto:efir...@hawaii.edu wrote: On 2013/06/04 2:05 PM, Charles R Harris wrote: On Tue

Re: [Numpy-discussion] GSOC 2013

2013-03-06 Thread Eric Firing
On 2013/03/05 8:14 AM, Kurt Smith wrote: On Tue, Mar 5, 2013 at 1:45 AM, Eric Firing efir...@hawaii.edu wrote: On 2013/03/04 9:01 PM, Nicolas Rougier wrote: This made me think of a serious performance limitation of structured dtypes: a structured dtype is always packed, which may lead

Re: [Numpy-discussion] GSOC 2013

2013-03-04 Thread Eric Firing
On 2013/03/04 9:01 PM, Nicolas Rougier wrote: This made me think of a serious performance limitation of structured dtypes: a structured dtype is always packed, which may lead to terrible byte alignment for common types. For instance, `dtype([('a', 'u1'), ('b', 'u8')]).itemsize == 9`,

Re: [Numpy-discussion] New numpy functions: filled, filled_like

2013-01-17 Thread Eric Firing
On 2013/01/17 4:13 AM, Pierre Haessig wrote: Hi, Le 14/01/2013 20:05, Benjamin Root a écrit : I do like the way you are thinking in terms of the broadcasting semantics, but I wonder if that is a bit awkward. What I mean is, if one were to use broadcasting semantics for creating an array,

Re: [Numpy-discussion] New numpy functions: filled, filled_like

2013-01-14 Thread Eric Firing
On 2013/01/14 6:15 AM, Olivier Delalleau wrote: - I agree the name collision with np.ma.filled is a problem. I have no better suggestion though at this point. How about initialized()? ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org

Re: [Numpy-discussion] New numpy functions: filled, filled_like

2013-01-13 Thread Eric Firing
On 2013/01/13 7:27 AM, Nathaniel Smith wrote: Hi all, PR 2875 adds two new functions, that generalize zeros(), ones(), zeros_like(), ones_like(), by simply taking an arbitrary fill value: https://github.com/numpy/numpy/pull/2875 So np.ones((10, 10)) is the same as np.filled((10,

Re: [Numpy-discussion] Regression: in-place operations (possibly intentional)

2012-09-21 Thread Eric Firing
On 2012/09/21 12:20 PM, Nathaniel Smith wrote: On Fri, Sep 21, 2012 at 10:04 PM, Chris Barker chris.bar...@noaa.gov wrote: On Fri, Sep 21, 2012 at 10:03 AM, Nathaniel Smith n...@pobox.com wrote: You're right of course. What I meant is that a += b should produce the same result as

Re: [Numpy-discussion] numpy.ma.MaskedArray.min() makes a copy?

2012-09-18 Thread Eric Firing
On 2012/09/18 7:40 AM, Benjamin Root wrote: On Fri, Sep 7, 2012 at 12:05 PM, Nathaniel Smith n...@pobox.com mailto:n...@pobox.com wrote: On 7 Sep 2012 14:38, Benjamin Root ben.r...@ou.edu mailto:ben.r...@ou.edu wrote: An issue just reported on the matplotlib-users list

Re: [Numpy-discussion] Regression: in-place operations (possibly intentional)

2012-09-18 Thread Eric Firing
On 2012/09/18 9:25 AM, Charles R Harris wrote: On Tue, Sep 18, 2012 at 1:13 PM, Benjamin Root ben.r...@ou.edu mailto:ben.r...@ou.edu wrote: On Tue, Sep 18, 2012 at 2:47 PM, Charles R Harris charlesr.har...@gmail.com mailto:charlesr.har...@gmail.com wrote: On Tue, Sep

Re: [Numpy-discussion] Fancy-indexing reorders output in corner cases?

2012-05-15 Thread Eric Firing
On 05/14/2012 06:03 PM, Travis Oliphant wrote: What happens, though when you have a[:, in1 :, in2]? in1 and in2 are broadcasted together to create a two-dimensional sub-space that must fit somewhere. Where should it go? Should it replace in1 or in2?I.e. should the output be

Re: [Numpy-discussion] Removing masked arrays for 1.7? (Was 1.7 blockers)

2012-04-17 Thread Eric Firing
On 04/17/2012 08:40 AM, Matthew Brett wrote: Hi, On Tue, Apr 17, 2012 at 7:24 AM, Nathaniel Smithn...@pobox.com wrote: On Tue, Apr 17, 2012 at 5:59 AM, Matthew Brettmatthew.br...@gmail.com wrote: Hi, On Mon, Apr 16, 2012 at 8:40 PM, Travis Oliphanttra...@continuum.io wrote: Mark and

Re: [Numpy-discussion] Masked Arrays in NumPy 1.x

2012-04-10 Thread Eric Firing
On 04/09/2012 06:52 PM, Travis Oliphant wrote: Hey all, I've been waiting for Mark Wiebe to arrive in Austin where he will spend several weeks, but I also know that masked arrays will be only one of the things he and I are hoping to make head-way on while he is in Austin.Nevertheless, we

Re: [Numpy-discussion] Using logical function on more than 2 arrays, availability of a between function ?

2012-03-25 Thread Eric Firing
On 03/25/2012 06:55 AM, Pierre Haessig wrote: Hi, I have an off topic but somehow related question : Le 19/03/2012 12:04, Matthieu Rigal a écrit : array = numpy.logical_and(numpy.logical_and(aBlueChannel 1.0, aNirChannel (aBlueChannel * 1.0)), aNirChannel (aBlueChannel * 1.8)) Is there

Re: [Numpy-discussion] Using logical function on more than 2 arrays, availability of a between function ?

2012-03-25 Thread Eric Firing
On 03/25/2012 12:22 PM, Pierre Haessig wrote: Hi Eric, Thanks for the hints ! Le 25/03/2012 20:33, Eric Firing a écrit : Using the bitwise operators in place of logical operators is a hack to get around limitations of the language; but, if done carefully, it is a useful one. What

Re: [Numpy-discussion] Missing data again

2012-03-07 Thread Eric Firing
On 03/07/2012 09:26 AM, Nathaniel Smith wrote: On Wed, Mar 7, 2012 at 5:17 PM, Charles R Harris charlesr.har...@gmail.com wrote: On Wed, Mar 7, 2012 at 9:35 AM, Pierre Haessigpierre.haes...@crans.org Coming back to Travis proposition bit-pattern approaches to missing data (*at least* for

Re: [Numpy-discussion] Missing data again

2012-03-07 Thread Eric Firing
On 03/07/2012 11:15 AM, Pierre Haessig wrote: Hi, Le 07/03/2012 20:57, Eric Firing a écrit : In other words, good low-level support for numpy.ma functionality? Coming back to *existing* ma support, I was just wondering whether it was now possible to np.save a masked array. (I'm using numpy

Re: [Numpy-discussion] Proposed Roadmap Overview

2012-02-18 Thread Eric Firing
On 02/17/2012 09:55 PM, David Cournapeau wrote: I may not have explained it very well: my whole point is that we don't recruite people, where I understand recruit as hiring full time, profesional programmers.We need more people who can casually spend a few hours - typically grad students,

Re: [Numpy-discussion] change the mask state of one element in a masked array

2012-02-18 Thread Eric Firing
On 02/18/2012 05:52 AM, Chao YUE wrote: Dear all, I built a new empty masked array: In [91]: a=np.ma.empty((2,5)) Of course this only makes sense if you are going to immediately populate the array. In [92]: a Out[92]: masked_array(data = [[ 1.20569155e-312 3.34730819e-316

Re: [Numpy-discussion] Proposed Roadmap Overview

2012-02-17 Thread Eric Firing
On 02/17/2012 05:39 AM, Charles R Harris wrote: On Fri, Feb 17, 2012 at 8:01 AM, David Cournapeau courn...@gmail.com mailto:courn...@gmail.com wrote: Hi Travis, On Thu, Feb 16, 2012 at 10:39 PM, Travis Oliphant tra...@continuum.io mailto:tra...@continuum.io wrote: Mark

Re: [Numpy-discussion] Numpy governance update

2012-02-15 Thread Eric Firing
On 02/15/2012 08:50 AM, Matthew Brett wrote: Hi, On Wed, Feb 15, 2012 at 5:51 AM, Alan G Isaacalan.is...@gmail.com wrote: On 2/14/2012 10:07 PM, Bruce Southey wrote: The one thing that gets over looked here is that there is a huge diversity of users with very different skill levels. But

Re: [Numpy-discussion] Change in scalar upcasting rules for 1.6.x?

2012-02-14 Thread Eric Firing
On 02/13/2012 08:07 PM, Charles R Harris wrote: Let it go, Travis. It's a waste of time. (Off-list) Chuck, I really appreciate your consistent good sense; this is just one of many examples. Thank you for all your numpy work. Eric ___

Re: [Numpy-discussion] Migrating issues to GitHub

2012-02-11 Thread Eric Firing
On 02/11/2012 10:44 AM, Travis Oliphant wrote: This is good feedback. It looks like there are 2 concerns: 1) no way to add attachments --- it would seem that gists and indeed other github repos solves that problem. Not really, in practice. Yes one can use these mechanisms, but they are

Re: [Numpy-discussion] numpy.arange() error?

2012-02-09 Thread Eric Firing
On 02/09/2012 09:20 AM, Drew Frank wrote: Eric Firingefiringat hawaii.edu writes: On 02/08/2012 09:31 PM, teomat wrote: Hi, Am I wrong or the numpy.arange() function is not correct 100%? Try to do this: In [7]: len(np.arange(3.1, 4.9, 0.1)) Out[7]: 18 In [8]: len(np.arange(8.1,

Re: [Numpy-discussion] numpy.arange() error?

2012-02-08 Thread Eric Firing
On 02/08/2012 09:31 PM, teomat wrote: Hi, Am I wrong or the numpy.arange() function is not correct 100%? Try to do this: In [7]: len(np.arange(3.1, 4.9, 0.1)) Out[7]: 18 In [8]: len(np.arange(8.1, 9.9, 0.1)) Out[8]: 19 I would expect the same result for each command. Not after more

Re: [Numpy-discussion] consensus (was: NA masks in the next numpy release?)

2011-10-29 Thread Eric Firing
On 10/29/2011 12:26 AM, Ralf Gommers wrote: The history of this discussion doesn't suggest it straightforward to get a design right first time. It's a complex subject. The second part of your statement, and then implement, sounds so simple. The reality is that there are only a handful of

Re: [Numpy-discussion] consensus (was: NA masks in the next numpy release?)

2011-10-29 Thread Eric Firing
On 10/29/2011 12:02 PM, Olivier Delalleau wrote: I haven't been following the discussion closely, but wouldn't it be instead: a.mask[0:2] = True? That would be consistent with numpy.ma and the opposite of Mark's implementation. I can live with either, but I much prefer the numpy.ma version

Re: [Numpy-discussion] consensus (was: NA masks in the next numpy release?)

2011-10-29 Thread Eric Firing
On 10/29/2011 12:57 PM, Charles R Harris wrote: On Sat, Oct 29, 2011 at 4:47 PM, Eric Firing efir...@hawaii.edu mailto:efir...@hawaii.edu wrote: On 10/29/2011 12:02 PM, Olivier Delalleau wrote: I haven't been following the discussion closely, but wouldn't

Re: [Numpy-discussion] NA masks in the next numpy release?

2011-10-25 Thread Eric Firing
On 10/25/2011 04:56 PM, Travis Oliphant wrote: So, I am very interested in making sure I remember the details of the counterproposal.What I recall is that you wanted to be able to differentiate between a bit-pattern mask and a boolean-array mask in the API. I believe currently even when

Re: [Numpy-discussion] NA masks in the next numpy release?

2011-10-23 Thread Eric Firing
On 10/23/2011 10:49 AM, Nathaniel Smith wrote: But I (and presumably others) were unaware of the pull request, because it turns out that actually Mark did*not* point to the pull request, at least in email to either me or numpy-discussion. As far as I can tell, the first time that pull request

Re: [Numpy-discussion] NA masks in the next numpy release?

2011-10-23 Thread Eric Firing
On 10/23/2011 12:34 PM, Nathaniel Smith wrote: like. And in this case I do think we can come up with an API that will make everyone happy, but that Mark's current API probably can't be incrementally evolved to become that API.) No one could object to coming up with an API that makes everyone

Re: [Numpy-discussion] wanted: decent matplotlib alternative

2011-10-13 Thread Eric Firing
On 10/13/2011 12:22 PM, Gökhan Sever wrote: On Thu, Oct 13, 2011 at 4:15 PM, Benjamin Root ben.r...@ou.edu mailto:ben.r...@ou.edu wrote: Myself and other developers would greatly appreciate help from the community to point out which examples are too confusing or out of date. We

Re: [Numpy-discussion] numpy.interp running time

2011-08-16 Thread Eric Firing
On 08/16/2011 04:22 AM, Timo Kluck wrote: 2011/8/1 Timo Klucktkl...@infty.nl: I just submitted a patch at http://projects.scipy.org/numpy/ticket/1920 . It implements Eric's suggestion. Please review, I'll be happy to adapt it to any of your feedback. I submitted a minor patch a while ago.

Re: [Numpy-discussion] Reading a big netcdf file

2011-08-03 Thread Eric Firing
On 08/03/2011 11:24 AM, Gökhan Sever wrote: I[1]: timeit a = np.fromfile('temp.npa', dtype=np.uint16) 1 loops, best of 3: 263 ms per loop You need to clear your cache and then run timeit with options -n1 -r1. Eric ___ NumPy-Discussion mailing list

Re: [Numpy-discussion] numpy.interp running time

2011-07-30 Thread Eric Firing
On 07/29/2011 11:18 AM, Timo Kluck wrote: Dear numpy developers, The current implementation of numpy.interp(x,xp,fp) comes down to: first calculating all the slopes of the linear interpolant (these are len(xp)-1), then use a binary search to find where x is in xp (running time log(len(xp)).

Re: [Numpy-discussion] code review request: masked dtype transfers

2011-07-09 Thread Eric Firing
On 07/08/2011 01:31 PM, Mark Wiebe wrote: I've just made pull request 105: https://github.com/numpy/numpy/pull/105 It's merged, which is good, but I have a suggestion relevant to that pull and I suspect to many others to come: use defines and macros to consolidate some of the implementation

Re: [Numpy-discussion] code review request: masked dtype transfers

2011-07-08 Thread Eric Firing
On 07/08/2011 01:31 PM, Mark Wiebe wrote: I've just made pull request 105: https://github.com/numpy/numpy/pull/105 This adds public API PyArray_MaskedCopyInto and PyArray_MaskedMoveInto, which behave analogously to the corresponding unmasked functions. To expose this with a reasonable

Re: [Numpy-discussion] code review request: masked dtype transfers

2011-07-08 Thread Eric Firing
On 07/08/2011 01:31 PM, Mark Wiebe wrote: I've just made pull request 105: https://github.com/numpy/numpy/pull/105 This adds public API PyArray_MaskedCopyInto and PyArray_MaskedMoveInto, which behave analogously to the corresponding unmasked functions. To expose this with a reasonable

Re: [Numpy-discussion] using the same vocabulary for missing value ideas

2011-07-07 Thread Eric Firing
On 07/06/2011 07:51 PM, Chris Barker wrote: On 7/6/11 11:57 AM, Mark Wiebe wrote: On Wed, Jul 6, 2011 at 1:25 PM, Christopher Barker Is this really true? if you use a bitpattern for IGNORE, haven't you just lost the ability to get the original value back if you want to stop

Re: [Numpy-discussion] Missing/accumulating data

2011-07-01 Thread Eric Firing
On 07/01/2011 10:27 AM, Charles R Harris wrote: On Fri, Jul 1, 2011 at 1:39 PM, Christopher Barker chris.bar...@noaa.gov mailto:chris.bar...@noaa.gov wrote: Joe Harrington wrote: All that has to happen is to allow the sense of the mask to be FALSE = the data

Re: [Numpy-discussion] alterNEP - was: missing data discussion round 2

2011-07-01 Thread Eric Firing
On 07/01/2011 06:40 PM, Nathaniel Smith wrote: On Fri, Jul 1, 2011 at 9:29 AM, Christopher Jordan-Squire BTW, you can't access the memory of a masked value by taking a view, at least if I'm reading this version of the NEP correctly, and it seems to be the latest:

Re: [Numpy-discussion] missing data discussion round 2

2011-06-30 Thread Eric Firing
On 06/30/2011 08:53 AM, Nathaniel Smith wrote: On Wed, Jun 29, 2011 at 2:21 PM, Eric Firingefir...@hawaii.edu wrote: In addition, for new code, the full-blown masked array module may not be needed. A convenience it adds, however, is the automatic masking of invalid values: In [1]:

Re: [Numpy-discussion] missing data discussion round 2

2011-06-29 Thread Eric Firing
On 06/29/2011 09:32 AM, Matthew Brett wrote: Hi, [...] Clearly there are some overlaps between what masked arrays are trying to achieve and what Rs NA mechanisms are trying to achieve. Are they really similar enough that they should function using the same API? And if so, won't that be

Re: [Numpy-discussion] missing data discussion round 2

2011-06-28 Thread Eric Firing
On 06/28/2011 07:26 AM, Nathaniel Smith wrote: On Tue, Jun 28, 2011 at 9:38 AM, Charles R Harris charlesr.har...@gmail.com wrote: Nathaniel, an implementation using masks will look *exactly* like an implementation using na-dtypes from the user's point of view. Except that taking a masked

Re: [Numpy-discussion] Concepts for masked/missing data

2011-06-25 Thread Eric Firing
On 06/25/2011 09:09 AM, Benjamin Root wrote: On Sat, Jun 25, 2011 at 1:57 PM, Nathaniel Smith n...@pobox.com mailto:n...@pobox.com wrote: On Sat, Jun 25, 2011 at 11:50 AM, Eric Firing efir...@hawaii.edu mailto:efir...@hawaii.edu wrote: On 06/25/2011 07:05 AM, Nathaniel Smith

Re: [Numpy-discussion] feedback request: proposal to add masks to the core ndarray

2011-06-23 Thread Eric Firing
On 06/23/2011 11:19 AM, Nathaniel Smith wrote: I'd like to see a statement of what the missing data problem is, and how this solves it? Because I don't think this is entirely intuitive, or that everyone necessarily has the same idea. Reduction operations like 'sum', 'prod', 'min', and 'max'

Re: [Numpy-discussion] fast grayscale conversion

2011-06-20 Thread Eric Firing
On 06/20/2011 10:41 AM, Zachary Pincus wrote: You could try: src_mono = src_rgb.astype(float).sum(axis=-1) / 3. But that speed does seem slow. Here are the relevant timings on my machine (a recent MacBook Pro) for a 3.1-megapixel-size array: In [16]: a = numpy.empty((2048, 1536, 3),

Re: [Numpy-discussion] unwrap for masked arrays?

2011-06-17 Thread Eric Firing
On 06/17/2011 06:56 AM, Benjamin Root wrote: It does not appear that unwrap works properly for masked arrays. First, it uses np.asarray() at the start of the function. However, that alone would not fix the problem given the nature of how unwrap works (performing diff operations). I tried a

Re: [Numpy-discussion] Python memory management issues using, Linux. Maybe Numpy, related.

2011-05-22 Thread Eric Firing
On 05/22/2011 08:17 AM, Jeffrey Spencer wrote: from numpy import arange, sum for x in range(1000): inhibVal = sum(arange(15)) Memory usage stays constant with Ubuntu 11.04, 64-bit, using the numpy 1.5.1 package from ubuntu, and using 1.6.1.dev-a265004. efiring@manini:~$ uname

  1   2   3   >