Re: [Numpy-discussion] Type specific sorts: objects, structured arrays, and all that.

2012-07-10 Thread Benjamin Root
On Tue, Jul 10, 2012 at 3:37 AM, Robert Kern robert.k...@gmail.com wrote: On Tue, Jul 10, 2012 at 4:32 AM, Charles R Harris charlesr.har...@gmail.com wrote: Hi All, I've been adding type specific sorts for object and structured arrays. It seems that datetime64 and timedelta64 are also

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

2012-07-10 Thread Benjamin Root
On Tue, Jul 10, 2012 at 6:07 AM, Ralf Gommers ralf.gomm...@googlemail.comwrote: On Tue, Jul 10, 2012 at 11:36 AM, Ralf Gommers ralf.gomm...@googlemail.com wrote: On Tue, Jul 10, 2012 at 4:20 AM, Six Silberman silberman@gmail.comwrote: Hi all, Some colleagues and I are

Re: [Numpy-discussion] build numpy 1.6.2

2012-07-10 Thread Benjamin Root
On Tue, Jul 10, 2012 at 2:45 PM, Prakash Joshi pjo...@numenta.com wrote: Hi All, I built numpy 1.6.2 on linux 64 bit and installed numpy in site-packages, It pass all the test cases of numpy, but I am not sure if this is good build; As I did not specified any fortran compiler while

Re: [Numpy-discussion] build numpy 1.6.2

2012-07-10 Thread Benjamin Root
Prakash, On Tue, Jul 10, 2012 at 3:26 PM, Prakash Joshi pjo...@numenta.com wrote: Thanks Ben. Also I did not specified any of BLAS, LAPACK, ATLAS libraries, do we need these libraries for numpy? Need, no, you do not need them in the sense that NumPy does not require them to work. NumPy

Re: [Numpy-discussion] Remove current 1.7 branch?

2012-07-12 Thread Benjamin Root
On Thursday, July 12, 2012, Thouis (Ray) Jones wrote: On Thu, Jul 12, 2012 at 1:28 AM, Charles R Harris charlesr.har...@gmail.com javascript:; wrote: Hi All, Travis and I agree that it would be appropriate to remove the current 1.7.x branch and branch again after a code freeze. That

Re: [Numpy-discussion] Remove current 1.7 branch?

2012-07-12 Thread Benjamin Root
On Thursday, July 12, 2012, Nathaniel Smith wrote: On Thu, Jul 12, 2012 at 12:48 PM, Benjamin Root ben.r...@ou.edujavascript:; wrote: On Thursday, July 12, 2012, Thouis (Ray) Jones wrote: On Thu, Jul 12, 2012 at 1:28 AM, Charles R Harris charlesr.har...@gmail.com javascript

Re: [Numpy-discussion] use slicing as argument values?

2012-07-12 Thread Benjamin Root
On Thu, Jul 12, 2012 at 3:38 PM, Chao YUE chaoyue...@gmail.com wrote: Dear all, I want to create a function and I would like one of the arguments of the function to determine what slicing of numpy array I want to use. a simple example: a=np.arange(100).reshape(10,10) suppose I want to

Re: [Numpy-discussion] use slicing as argument values?

2012-07-12 Thread Benjamin Root
Root 2012/7/12 Benjamin Root ben.r...@ou.edu On Thu, Jul 12, 2012 at 3:38 PM, Chao YUE chaoyue...@gmail.com wrote: Dear all, I want to create a function and I would like one of the arguments of the function to determine what slicing of numpy array I want to use. a simple example

Re: [Numpy-discussion] use slicing as argument values?

2012-07-12 Thread Benjamin Root
On Thursday, July 12, 2012, Chao YUE wrote: Thanks all for the discussion. Actually I am trying to use something like numpy ndarray indexing in the function. Like when I call: func(a,'1:3,:,2:4'), it knows I want to retrieve a[1:3,:,2:4], and func(a,'1:3,:,4') for a[1:3,:,4] ect. I am very

Re: [Numpy-discussion] numpy.complex

2012-07-23 Thread Benjamin Root
On Monday, July 23, 2012, OC wrote: It's unPythonic just in the sense that it is unlike every other type constructor in Python. int(x) returns an int, list(x) returns a list, but np.complex64(x) sometimes returns a np.complex64, and sometimes it returns a np.ndarray, depending on what

Re: [Numpy-discussion] Synonym standards

2012-07-26 Thread Benjamin Root
On Thu, Jul 26, 2012 at 4:45 PM, Colin J. Williams fn...@ncf.ca wrote: It seems that these standards have been adopted, which is good: The following import conventions are used throughout the NumPy source and documentation: import numpy as np import matplotlib as mpl import

Re: [Numpy-discussion] Synonym standards

2012-07-27 Thread Benjamin Root
On Thu, Jul 26, 2012 at 7:12 PM, Robert Kern robert.k...@gmail.com wrote: On Fri, Jul 27, 2012 at 12:05 AM, Colin J. Williams cjwilliam...@gmail.com wrote: On 26/07/2012 4:57 PM, Benjamin Root wrote: On Thu, Jul 26, 2012 at 4:45 PM, Colin J. Williams fn...@ncf.ca wrote: It seems

Re: [Numpy-discussion] bug in numpy.where?

2012-07-27 Thread Benjamin Root
On Thu, Jul 26, 2012 at 2:33 PM, Phil Hodge ho...@stsci.edu wrote: On a Linux machine: uname -srvop Linux 2.6.18-308.8.2.el5 #1 SMP Tue May 29 11:54:17 EDT 2012 x86_64 GNU/Linux this example shows an apparent problem with the where function: Python 2.7.1 (r271:86832, Dec 21 2010,

Re: [Numpy-discussion] bug in numpy.where?

2012-07-27 Thread Benjamin Root
On Fri, Jul 27, 2012 at 3:58 PM, Andreas Mueller amuel...@ais.uni-bonn.dewrote: Hi Everybody. The bug is that no error is raised, right? The docs say where(condition, [x, y]) x, y : array_like, optional Values from which to choose. `x` and `y` need to have the same shape as

Re: [Numpy-discussion] ANN: NumPy 1.7.0b1 release

2012-08-23 Thread Benjamin Root
On Tue, Aug 21, 2012 at 12:24 PM, Ondřej Čertík ondrej.cer...@gmail.comwrote: Hi, I'm pleased to announce the availability of the first beta release of NumPy 1.7.0b1. Sources and binary installers can be found at https://sourceforge.net/projects/numpy/files/NumPy/1.7.0b1/ Please test

Re: [Numpy-discussion] broadcasting question

2012-08-30 Thread Benjamin Root
On Thursday, August 30, 2012, Neal Becker wrote: I think this should be simple, but I'm drawing a blank I have 2 2d matrixes Matrix A has indexes (i, symbol) Matrix B has indexes (state, symbol) I combined them into a 3d matrix: C = A[:,newaxis,:] + B[newaxis,:,:] where C has indexes

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

2012-09-07 Thread Benjamin Root
An issue just reported on the matplotlib-users list involved a user who ran out of memory while attempting to do an imshow() on a large array. While this wouldn't be totally unexpected, the user's traceback shows that they ran out of memory before any actual building of the image occurred.

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

2012-09-17 Thread Benjamin Root
Consider the following code: import numpy as np a = np.array([1, 2, 3, 4, 5], dtype=np.int16) a *= float(255) / 15 In v1.6.x, this yields: array([17, 34, 51, 68, 85], dtype=int16) But in master, this throws an exception about failing to cast via same_kind. Note that numpy was smart about this

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

2012-09-18 Thread Benjamin Root
On Mon, Sep 17, 2012 at 9:33 PM, Charles R Harris charlesr.har...@gmail.com wrote: On Mon, Sep 17, 2012 at 3:40 PM, Travis Oliphant tra...@continuum.iowrote: On Sep 17, 2012, at 8:42 AM, Benjamin Root wrote: Consider the following code: import numpy as np a = np.array([1, 2, 3, 4

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

2012-09-18 Thread Benjamin Root
On Fri, Sep 7, 2012 at 12:05 PM, Nathaniel Smith n...@pobox.com wrote: On 7 Sep 2012 14:38, Benjamin Root ben.r...@ou.edu wrote: An issue just reported on the matplotlib-users list involved a user who ran out of memory while attempting to do an imshow() on a large array. While

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

2012-09-18 Thread Benjamin Root
On Tue, Sep 18, 2012 at 3:19 PM, Ralf Gommers ralf.gomm...@gmail.comwrote: On Tue, Sep 18, 2012 at 9:13 PM, Benjamin Root ben.r...@ou.edu wrote: On Tue, Sep 18, 2012 at 2:47 PM, Charles R Harris charlesr.har...@gmail.com wrote: On Tue, Sep 18, 2012 at 11:39 AM, Benjamin Root ben.r

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

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

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

2012-09-18 Thread Benjamin Root
On Tue, Sep 18, 2012 at 4:42 PM, Charles R Harris charlesr.har...@gmail.com wrote: On Tue, Sep 18, 2012 at 2:33 PM, Travis Oliphant tra...@continuum.iowrote: On Sep 18, 2012, at 2:44 PM, Charles R Harris wrote: On Tue, Sep 18, 2012 at 1:35 PM, Benjamin Root ben.r...@ou.edu wrote

Re: [Numpy-discussion] specifying numpy as dependency in your project, install_requires

2012-09-21 Thread Benjamin Root
On Fri, Sep 21, 2012 at 4:19 PM, Travis Oliphant tra...@continuum.iowrote: On Sep 21, 2012, at 3:13 PM, Ralf Gommers wrote: Hi, An issue I keep running into is that packages use: install_requires = [numpy] or install_requires = ['numpy = 1.6'] in their setup.py. This simply

Re: [Numpy-discussion] how to pipe into numpy arrays?

2012-10-24 Thread Benjamin Root
On Wed, Oct 24, 2012 at 3:00 PM, Michael Aye kmichael@gmail.com wrote: As numpy.fromfile seems to require full file object functionalities like seek, I can not use it with the sys.stdin pipe. So how could I stream a binary pipe directly into numpy? I can imagine storing the data in a

[Numpy-discussion] Regression in mpl: AttributeError: incompatible shape for a non-contiguous array

2012-10-29 Thread Benjamin Root
This error started showing up in the test suite for mpl when using numpy master. AttributeError: incompatible shape for a non-contiguous array The tracebacks all point back to various code points where we are trying to set the shape of an array, e.g., offsets.shape = (-1, 2) Those lines

Re: [Numpy-discussion] Regression in mpl: AttributeError: incompatible shape for a non-contiguous array

2012-10-29 Thread Benjamin Root
On Mon, Oct 29, 2012 at 10:33 AM, Sebastian Berg sebast...@sipsolutions.net wrote: Hey, On Mon, 2012-10-29 at 09:54 -0400, Benjamin Root wrote: This error started showing up in the test suite for mpl when using numpy master. AttributeError: incompatible shape for a non-contiguous

Re: [Numpy-discussion] Regression in mpl: AttributeError: incompatible shape for a non-contiguous array

2012-10-29 Thread Benjamin Root
. Candidate / Liaison to the HWT School of Meteorology / University of Oklahoma Cooperative Institute for Mesoscale Meteorological Studies National Severe Storms Laboratory http://www.patricktmarsh.com On Mon, Oct 29, 2012 at 9:43 AM, Benjamin Root ben.r...@ou.edu wrote: On Mon, Oct 29

Re: [Numpy-discussion] Simple question about scatter plot graph

2012-10-31 Thread Benjamin Root
On Wednesday, October 31, 2012, wrote: On Wed, Oct 31, 2012 at 8:59 PM, klo uo klo...@gmail.com javascript:; wrote: Thanks for your reply I suppose, variable length signals are split on equal parts and dominant harmonic is extracted. Then scatter plot shows this pattern, which has some

Re: [Numpy-discussion] Do we want scalar casting to behave as it does at the moment?

2012-11-12 Thread Benjamin Root
On Monday, November 12, 2012, Olivier Delalleau wrote: 2012/11/12 Nathaniel Smith n...@pobox.com javascript:_e({}, 'cvml', 'n...@pobox.com'); On Mon, Nov 12, 2012 at 8:54 PM, Matthew Brett matthew.br...@gmail.comjavascript:_e({}, 'cvml', 'matthew.br...@gmail.com'); wrote: Hi, I

Re: [Numpy-discussion] Do we want scalar casting to behave as it does at the moment?

2012-11-12 Thread Benjamin Root
On Monday, November 12, 2012, Benjamin Root wrote: On Monday, November 12, 2012, Olivier Delalleau wrote: 2012/11/12 Nathaniel Smith n...@pobox.com On Mon, Nov 12, 2012 at 8:54 PM, Matthew Brett matthew.br...@gmail.com wrote: Hi, I wanted to check that everyone knows about

Re: [Numpy-discussion] Do we want scalar casting to behave as it does at the moment?

2012-11-12 Thread Benjamin Root
On Monday, November 12, 2012, Matthew Brett wrote: Hi, On Mon, Nov 12, 2012 at 8:15 PM, Benjamin Root ben.r...@ou.edu wrote: On Monday, November 12, 2012, Olivier Delalleau wrote: 2012/11/12 Nathaniel Smith n...@pobox.com On Mon, Nov 12, 2012 at 8:54 PM, Matthew Brett

Re: [Numpy-discussion] the fast way to loop over ndarray elements?

2012-11-17 Thread Benjamin Root
On Saturday, November 17, 2012, Chao YUE wrote: Dear all, I need to make a linear contrast of the 2D numpy array data from an interval to another, the approach is: I have another two list: base target, then I check for each ndarray element data[i,j], if base[m] = data[i,j] = base[m+1],

Re: [Numpy-discussion] float32 to float64 casting

2012-11-17 Thread Benjamin Root
On Saturday, November 17, 2012, Charles R Harris wrote: On Sat, Nov 17, 2012 at 1:00 PM, Olivier Delalleau sh...@keba.bejavascript:_e({}, 'cvml', 'sh...@keba.be'); wrote: 2012/11/17 Gökhan Sever gokhanse...@gmail.com javascript:_e({}, 'cvml', 'gokhanse...@gmail.com'); On Sat, Nov

Re: [Numpy-discussion] Allowing 0-d arrays in np.take

2012-12-04 Thread Benjamin Root
On Tue, Dec 4, 2012 at 8:57 AM, Sebastian Berg sebast...@sipsolutions.netwrote: Hey, Maybe someone has an opinion about this (since in fact it is new behavior, so it is undefined). `np.take` used to not allow 0-d/scalar input but did allow any other dimensions for the indices. Thinking about

Re: [Numpy-discussion] Proposal to drop python 2.4 support in numpy 1.8

2012-12-13 Thread Benjamin Root
As a point of reference, python 2.4 is on RH5/CentOS5. While RH6 is the current version, there are still enterprises that are using version 5. Of course, at this point, one really should be working on a migration plan and shouldn't be doing new development on those machines... Ben Root

Re: [Numpy-discussion] Support for python 2.4 dropped. Should we drop 2.5 also?

2012-12-13 Thread Benjamin Root
On Thu, Dec 13, 2012 at 12:38 PM, Charles R Harris charlesr.har...@gmail.com wrote: The previous proposal to drop python 2.4 support garnered no opposition. How about dropping support for python 2.5 also? Chuck matplotlib 1.2 supports py2.5. I haven't seen any plan to move off of that for

Re: [Numpy-discussion] Support for python 2.4 dropped. Should we drop 2.5 also?

2012-12-13 Thread Benjamin Root
My apologies... we support 2.6 and above. +1 on dropping 2.5 support. Ben On Thu, Dec 13, 2012 at 1:12 PM, Benjamin Root ben.r...@ou.edu wrote: On Thu, Dec 13, 2012 at 12:38 PM, Charles R Harris charlesr.har...@gmail.com wrote: The previous proposal to drop python 2.4 support garnered

Re: [Numpy-discussion] Insights / lessons learned from NumPy design

2013-01-09 Thread Benjamin Root
On Wed, Jan 9, 2013 at 9:58 AM, Nathaniel Smith n...@pobox.com wrote: On Wed, Jan 9, 2013 at 2:53 PM, Alan G Isaac alan.is...@gmail.com wrote: I'm just a Python+NumPy user and not a CS type. May I ask a naive question on this thread? Given the work that has (as I understand it) gone into

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

2013-01-14 Thread Benjamin Root
On Mon, Jan 14, 2013 at 7:38 AM, Pierre Haessig pierre.haes...@crans.orgwrote: Hi, Le 14/01/2013 00:39, Nathaniel Smith a écrit : (The nice thing about np.filled() is that it makes np.zeros() and np.ones() feel like clutter, rather than the reverse... not that I'm suggesting ever getting

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

2013-01-14 Thread Benjamin Root
On Mon, Jan 14, 2013 at 12:27 PM, Eric Firing efir...@hawaii.edu wrote: 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()? A verb! +1 from me! For those

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

2013-01-14 Thread Benjamin Root
On Mon, Jan 14, 2013 at 1:56 PM, David Warde-Farley d.warde.far...@gmail.com wrote: On Mon, Jan 14, 2013 at 1:12 PM, Pierre Haessig pierre.haes...@crans.org wrote: In [8]: tile(nan, (3,3)) # (it's a verb ! ) tile, in my opinion, is useful in some cases (for people who think in terms of

Re: [Numpy-discussion] Shouldn't all in-place operations simply return self?

2013-01-17 Thread Benjamin Root
On Thu, Jan 17, 2013 at 8:54 AM, Jim Vickroy jim.vick...@noaa.gov wrote: On 1/16/2013 11:41 PM, Nathaniel Smith wrote: On 16 Jan 2013 17:54, josef.p...@gmail.com wrote: a = np.random.random_integers(0, 5, size=5) b = a.sort() b a array([0, 1, 2, 5, 5]) b =

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

2013-01-17 Thread Benjamin Root
On Thu, Jan 17, 2013 at 5:04 PM, Eric Firing efir...@hawaii.edu wrote: 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

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

2013-01-18 Thread Benjamin Root
On Fri, Jan 18, 2013 at 3:44 AM, Daniele Nicolodi dani...@grinta.netwrote: On 17/01/2013 23:27, Mark Wiebe wrote: Would it be too weird or clumsy to extend the empty and empty_like functions to do the filling? np.empty((10, 10), fill=np.nan) np.empty_like(my_arr, fill=np.nan)

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

2013-01-18 Thread Benjamin Root
On Fri, Jan 18, 2013 at 11:36 AM, Daniele Nicolodi dani...@grinta.netwrote: On 18/01/2013 15:19, Benjamin Root wrote: On Fri, Jan 18, 2013 at 3:44 AM, Daniele Nicolodi dani...@grinta.net mailto:dani...@grinta.net wrote: On 17/01/2013 23:27, Mark Wiebe wrote: Would

Re: [Numpy-discussion] np.where: x and y need to have the same shape as condition ?

2013-01-29 Thread Benjamin Root
On Tue, Jan 29, 2013 at 6:16 AM, denis denis-bz...@t-online.de wrote: Folks, the doc for `where` says x and y need to have the same shape as condition http://docs.scipy.org/doc/numpy-dev/reference/generated/numpy.where.html But surely where is equivalent to: [xv if c else yv for

Re: [Numpy-discussion] Issues to fix for 1.7.0rc2.

2013-02-06 Thread Benjamin Root
On Wed, Feb 6, 2013 at 4:18 AM, Dag Sverre Seljebotn d.s.seljeb...@astro.uio.no wrote: On 02/06/2013 08:41 AM, Charles R Harris wrote: On Tue, Feb 5, 2013 at 11:50 PM, Jason Grout jason-s...@creativetrax.com mailto:jason-s...@creativetrax.com wrote: On 2/6/13 12:46 AM, Charles

Re: [Numpy-discussion] Dealing with the mode argument in qr.

2013-02-06 Thread Benjamin Root
On Tue, Feb 5, 2013 at 4:23 PM, Charles R Harris charlesr.har...@gmail.comwrote: Hi All, This post is to bring the discussion of PR #2965https://github.com/numpy/numpy/pull/2965to the attention of the list. There are at least three issues in play here. 1) The PR adds modes 'big' and

Re: [Numpy-discussion] Where's that function?

2013-02-06 Thread Benjamin Root
On Wed, Feb 6, 2013 at 1:08 PM, josef.p...@gmail.com wrote: I'm convinced that I saw a while ago a function that uses a list of interval boundaries to index into an array, either to iterate or to take. I thought that's very useful, but didn't make a note. Now, I have no idea where I saw

Re: [Numpy-discussion] Array accumulation in numpy

2013-02-19 Thread Benjamin Root
On Tue, Feb 19, 2013 at 10:00 AM, Tony Ladd tl...@che.ufl.edu wrote: I want to accumulate elements of a vector (x) to an array (f) based on an index list (ind). For example: x=[1,2,3,4,5,6] ind=[1,3,9,3,4,1] f=np.zeros(10) What I want would be produced by the loop for i=range(6):

Re: [Numpy-discussion] Adding .abs() method to the array object

2013-02-23 Thread Benjamin Root
On Sat, Feb 23, 2013 at 8:20 PM, josef.p...@gmail.com wrote: On Sat, Feb 23, 2013 at 3:33 PM, Robert Kern robert.k...@gmail.com wrote: On Sat, Feb 23, 2013 at 7:25 PM, Nathaniel Smith n...@pobox.com wrote: On Sat, Feb 23, 2013 at 3:38 PM, Till Stensitzki mail.t...@gmx.de wrote: Hello,

Re: [Numpy-discussion] a question about freeze on numpy 1.7.0

2013-02-24 Thread Benjamin Root
On Sun, Feb 24, 2013 at 8:16 PM, Ondřej Čertík ondrej.cer...@gmail.comwrote: Hi Gelin, On Sun, Feb 24, 2013 at 12:08 AM, Gelin Yan dynami...@gmail.com wrote: Hi All When I used numpy 1.7.0 with cx_freeze 4.3.1 on windows, I quickly found out even a simple import numpy may lead to

Re: [Numpy-discussion] reshaping arrays

2013-03-04 Thread Benjamin Root
On Sat, Mar 2, 2013 at 11:35 PM, Sudheer Joseph sudheer.jos...@yahoo.comwrote: Hi Brad, I am not getting the attribute reshape for the array, are you having a different version of numpy than mine? I have In [55]: np.__version__ Out[55]: '1.7.0' and detail of the shape

Re: [Numpy-discussion] Implementing a find first style function

2013-03-06 Thread Benjamin Root
On Tue, Mar 5, 2013 at 9:15 AM, Phil Elson pelson@gmail.com wrote: The ticket https://github.com/numpy/numpy/issues/2269 discusses the possibility of implementing a find first style function which can optimise the process of finding the first value(s) which match a predicate in a given 1D

Re: [Numpy-discussion] feature tracking in numpy/scipy

2013-03-07 Thread Benjamin Root
On Sat, Mar 2, 2013 at 5:32 PM, Scott Collis scollis.a...@gmail.com wrote: Good afternoon list, I am looking at feature tracking in a 2D numpy array, along the lines of Dixon and Wiener 1993 (for tracking precipitating storms) Identifying features based on threshold is quite trivial using

Re: [Numpy-discussion] timezones and datetime64

2013-04-03 Thread Benjamin Root
On Wed, Apr 3, 2013 at 7:52 PM, Chris Barker - NOAA Federal chris.bar...@noaa.gov wrote: Personally, I never need finer resolution than seconds, nor more than a century, so it's no big deal to me, but just wondering A use case for finer resolution than seconds (in our field, no less!)

Re: [Numpy-discussion] datetime64 1970 issue

2013-04-16 Thread Benjamin Root
On Tue, Apr 16, 2013 at 7:45 PM, Ondřej Čertík ondrej.cer...@gmail.comwrote: On Tue, Apr 16, 2013 at 4:55 PM, Bob Nnamtrop bob.nnamt...@gmail.com wrote: I am curious if others have noticed an issue with datetime64 at the beginning of 1970. First: In [144]: (np.datetime64('1970-01-01') -

Re: [Numpy-discussion] datetime64 1970 issue

2013-04-17 Thread Benjamin Root
On Wed, Apr 17, 2013 at 7:10 PM, Chris Barker - NOAA Federal chris.bar...@noaa.gov wrote: On Wed, Apr 17, 2013 at 1:09 PM, Bob Nnamtrop bob.nnamt...@gmail.com wrote: It would seem that before 1970 the dates do not include the time zone adjustment while after 1970 they do. This is the

Re: [Numpy-discussion] datetime64 1970 issue

2013-04-18 Thread Benjamin Root
On Thu, Apr 18, 2013 at 2:27 AM, Joris Van den Bossche jorisvandenboss...@gmail.com wrote: ANyone tested this on Windows? On Windows 7, numpy 1.7.0 (Anaconda 1.4.0 64 bit), I don't even get a wrong answer, but an error: In [3]: np.datetime64('1969-12-31 00') Out[3]:

Re: [Numpy-discussion] type conversion question

2013-04-18 Thread Benjamin Root
On Thu, Apr 18, 2013 at 7:31 PM, K.-Michael Aye kmichael@gmail.comwrote: I don't understand why sometimes a direct assignment of a new dtype is possible (but messes up the values), and why at other times a seemingly harmless upcast (in my potentially ignorant point of view) is not

Re: [Numpy-discussion] 1.8 release

2013-04-29 Thread Benjamin Root
On Thu, Apr 25, 2013 at 11:16 AM, Charles R Harris charlesr.har...@gmail.com wrote: Hi All, I think it is time to start the runup to the 1.8 release. I don't know of any outstanding blockers but if anyone has a PR/issue that they feel needs to be in the next Numpy release now is the time to

[Numpy-discussion] nanmean(), nanstd() and other missing functions for 1.8

2013-04-30 Thread Benjamin Root
Currently, I am in the process of migrating some co-workers from Matlab and IDL, and the number one complaint I get is that numpy has nansum() but no nanmean() and nanstd(). While we do have an alternative in the form of masked arrays, most of these people are busy enough trying to port their

Re: [Numpy-discussion] nanmean(), nanstd() and other missing functions for 1.8

2013-05-01 Thread Benjamin Root
On Wed, May 1, 2013 at 1:13 AM, Chris Barker - NOAA Federal chris.bar...@noaa.gov wrote: Of course, the documentation for discussed before: np.minmax(). My thinking is that it would return a 2xN array How about a tuple: (min, max)? I am not familiar enough with numpy internals to know

Re: [Numpy-discussion] Proposal of new function: iteraxis()

2013-05-01 Thread Benjamin Root
On Mon, Apr 29, 2013 at 2:10 PM, Andrew Giessel andrew_gies...@hms.harvard.edu wrote: Matthew: Thanks for the link to array order discussion. Any more thoughts on Phil's slice() function? I rather like Phil's solution. Just some caveats. Will it always return views or copies? It should

Re: [Numpy-discussion] nanmean(), nanstd() and other missing functions for 1.8

2013-05-01 Thread Benjamin Root
So, to summarize the thread so far: Consensus: np.nanmean() np.nanstd() np.minmax() np.argminmax() Vague Consensus: np.sincos() No Consensus (possibly out of scope for this topic): Better constructors for complex types I can probably whip up the PR for the nanmean() and nanstd(), and can

Re: [Numpy-discussion] nanmean(), nanstd() and other missing functions for 1.8

2013-05-01 Thread Benjamin Root
I have created a PR for the first two (and got np.nanvar() for free). https://github.com/numpy/numpy/pull/3297 Cheers! Ben Root ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] numpy.nanmin, numpy.nanmax, and scipy.stats.nanmean

2013-05-16 Thread Benjamin Root
On Thu, May 16, 2013 at 6:09 PM, Phillip Feldman phillip.m.feld...@gmail.com wrote: It seems odd that `nanmin` and `nanmax` are in NumPy, while `nanmean` is in SciPy.stats. I'd like to propose that a `nanmean` function be added to NumPy. Have no fear. There is already plans for its

Re: [Numpy-discussion] NumPy sprints at Scipy 2013, Austin: call for topics and hands to help

2013-05-25 Thread Benjamin Root
On Sat, May 25, 2013 at 12:37 PM, Charles R Harris charlesr.har...@gmail.com wrote: On Sat, May 25, 2013 at 9:51 AM, David Cournapeau courn...@gmail.comwrote: On Sat, May 25, 2013 at 4:19 PM, Charles R Harris charlesr.har...@gmail.com wrote: On Sat, May 25, 2013 at 8:23 AM, David

Re: [Numpy-discussion] genfromtxt() skips comments

2013-05-31 Thread Benjamin Root
On Fri, May 31, 2013 at 5:08 PM, Albert Kottke albert.kot...@gmail.comwrote: I noticed that genfromtxt() did not skip comments if the keyword names is not True. If names is True, then genfromtxt() would take the first line as the names. I am proposing a fix to genfromtxt that skips all of the

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

2013-06-04 Thread Benjamin Root
Could non-monotonicity be detected as part of the interp process? Perhaps a sign switch in the deltas? I have been bitten by this problem too. Cheers! Ben Root On Jun 4, 2013 9:08 PM, Eric Firing efir...@hawaii.edu wrote: On 2013/06/04 2:05 PM, Charles R Harris wrote: On Tue, Jun 4,

Re: [Numpy-discussion] floats coerced to string with {:f}.format() ?

2013-06-06 Thread Benjamin Root
You can treat a record in a record array like a tuple or a dictionary when it comes to formatting. So, either refer to the index element you want formatted as a float, or refer to it by name (in the formatting language). By just doing {:f}, you are just grabbing the first one, which is XXYYZZ and

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

2013-06-13 Thread Benjamin Root
On Thu, Jun 13, 2013 at 9:36 AM, Aldcroft, Thomas aldcr...@head.cfa.harvard.edu wrote: On Wed, Jun 12, 2013 at 2:55 PM, Eric Firing efir...@hawaii.edu wrote: On 2013/06/12 8:13 AM, Warren Weckesser wrote: That's why I suggested 'filledwith' (add the underscore if you like). This also

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

2013-06-14 Thread Benjamin Root
On Fri, Jun 14, 2013 at 1:21 PM, Robert Kern robert.k...@gmail.com wrote: On Fri, Jun 14, 2013 at 6:18 PM, Eric Firing efir...@hawaii.edu wrote: 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

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

2013-06-14 Thread Benjamin Root
On Fri, Jun 14, 2013 at 1:22 PM, Nathaniel Smith n...@pobox.com 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

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

2013-06-15 Thread Benjamin Root
On Fri, Jun 14, 2013 at 6:38 PM, Eric Firing efir...@hawaii.edu wrote: 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 Perhaps a BoF session should be put together for SciPy 2013, and possibly even have a

Re: [Numpy-discussion] Allow == and != to raise errors

2013-07-12 Thread Benjamin Root
I can see where you are getting at, but I would have to disagree. First of all, when a comparison between two mis-shaped arrays occur, you get back a bone fide python boolean, not a numpy array of bools. So if any action was taken on the result of such a comparison assumed that the result was

Re: [Numpy-discussion] What should be the result in some statistics corner cases?

2013-07-15 Thread Benjamin Root
This is going to need to be heavily documented with doctests. Also, just to clarify, are we talking about a ValueError for doing a nansum on an empty array as well, or will that now return a zero? Ben Root On Mon, Jul 15, 2013 at 9:52 AM, Charles R Harris charlesr.har...@gmail.com wrote:

Re: [Numpy-discussion] What should be the result in some statistics corner cases?

2013-07-15 Thread Benjamin Root
On Jul 15, 2013 11:47 AM, Charles R Harris charlesr.har...@gmail.com wrote: On Mon, Jul 15, 2013 at 8:58 AM, Charles R Harris charlesr.har...@gmail.com wrote: On Mon, Jul 15, 2013 at 8:34 AM, Sebastian Berg sebast...@sipsolutions.net wrote: On Mon, 2013-07-15 at 07:52 -0600, Charles

Re: [Numpy-discussion] What should be the result in some statistics corner cases?

2013-07-15 Thread Benjamin Root
08:33:47 -0600, Charles R Harris wrote: On Mon, Jul 15, 2013 at 8:25 AM, Benjamin Root ben.r...@ou.edu wrote: This is going to need to be heavily documented with doctests. Also, just to clarify, are we talking about a ValueError for doing a nansum on an empty array as well

Re: [Numpy-discussion] azip

2013-07-18 Thread Benjamin Root
Forgive my ignorance, but has numpy and scipy stopped doing that weird doc editing thing that existed back in the days of Trac? I have actually held back on submitting doc edits because I hated using that thing so much. ___ NumPy-Discussion mailing list

Re: [Numpy-discussion] azip

2013-07-18 Thread Benjamin Root
...@iki.fi wrote: 18.07.2013 20:18, Benjamin Root kirjoitti: Forgive my ignorance, but has numpy and scipy stopped doing that weird doc editing thing that existed back in the days of Trac? I have actually held back on submitting doc edits because I hated using that thing so much. You were never

Re: [Numpy-discussion] fresh performance hits: numpy.linalg.pinv 30% slowdown

2013-07-22 Thread Benjamin Root
On Mon, Jul 22, 2013 at 10:55 AM, Yaroslav Halchenko li...@onerussian.comwrote: At some point I hope to tune up the report with an option of viewing the plot using e.g. nvd3 JS so it could be easier to pin point/analyze interactively. shameless plug... the soon-to-be-finalized matplotlib-1.3

Re: [Numpy-discussion] .flat (was: add .H attribute?)

2013-07-23 Thread Benjamin Root
On Tue, Jul 23, 2013 at 10:11 AM, Stéfan van der Walt ste...@sun.ac.zawrote: On Tue, Jul 23, 2013 at 3:39 PM, Alan G Isaac alan.is...@gmail.com wrote: On 7/23/2013 9:09 AM, Pauli Virtanen wrote: .flat which I think is rarely used Don't assume .flat is not commonly used. A common

Re: [Numpy-discussion] .flat

2013-07-23 Thread Benjamin Root
On Tue, Jul 23, 2013 at 10:46 AM, Pauli Virtanen p...@iki.fi wrote: 23.07.2013 17:34, Benjamin Root kirjoitti: [clip] Don't assume .flat is not commonly used. A common idiom in matlab is a[:] to flatten an array. When porting code over from matlab, it is typical to replace

Re: [Numpy-discussion] fresh performance hits: numpy.linalg.pinv 30% slowdown

2013-07-23 Thread Benjamin Root
On Mon, Jul 22, 2013 at 1:28 PM, Yaroslav Halchenko li...@onerussian.comwrote: On Mon, 22 Jul 2013, Benjamin Root wrote: At some point I hope to tune up the report with an option of viewing the plot using e.g. nvd3 JS so it could be easier to pin point/analyze

Re: [Numpy-discussion] add .H attribute?

2013-07-24 Thread Benjamin Root
On Wed, Jul 24, 2013 at 8:47 AM, Daπid davidmen...@gmail.com wrote: An idea: If .H is ideally going to be a view, and we want to keep it this way, we could have a .h() method with the present implementation. This would preserve the name .H for the conjugate view --when someone finds the way

Re: [Numpy-discussion] import overhead of numpy.testing

2013-08-10 Thread Benjamin Root
On Aug 10, 2013 12:50 PM, Ralf Gommers ralf.gomm...@gmail.com wrote: On Sat, Aug 10, 2013 at 5:21 PM, Andrew Dalke da...@dalkescientific.com wrote: [Short version: It doesn't look like my proposal or any simple alternative is tenable.] On Aug 10, 2013, at 10:28 AM, Ralf Gommers wrote:

Re: [Numpy-discussion] import overhead of numpy.testing

2013-08-11 Thread Benjamin Root
On Aug 11, 2013 5:02 AM, Ralf Gommers ralf.gomm...@gmail.com wrote: On Sun, Aug 11, 2013 at 3:35 AM, Benjamin Root ben.r...@ou.edu wrote: Would there be some sort of way to detect that numpy.testing wasn't explicitly imported and issue a deprecation warning? Say, move the code into numpy

Re: [Numpy-discussion] import overhead of numpy.testing

2013-08-11 Thread Benjamin Root
On Aug 11, 2013 4:37 PM, Andrew Dalke da...@dalkescientific.com wrote: On Aug 11, 2013, at 10:24 PM, Benjamin Root wrote: The idea would be that within numpy (and we should fix SciPy as well), we would always import numpy._testing as testing, and not import testing.py ourselves. The problem

Re: [Numpy-discussion] RAM problem during code execution - Numpya arrays

2013-08-23 Thread Benjamin Root
On Fri, Aug 23, 2013 at 10:34 AM, Francesc Alted franc...@continuum.iowrote: Hi José, The code is somewhat longish for a pure visual inspection, but my advice is that you install memory profiler ( https://pypi.python.org/pypi/memory_profiler). This will help you determine which line or

Re: [Numpy-discussion] 1.8.0 branch reminder

2013-08-26 Thread Benjamin Root
On Mon, Aug 26, 2013 at 11:01 AM, Ralf Gommers ralf.gomm...@gmail.comwrote: On Sun, Aug 18, 2013 at 6:36 PM, Charles R Harris charlesr.har...@gmail.com wrote: On Sun, Aug 18, 2013 at 12:17 PM, Charles R Harris charlesr.har...@gmail.com wrote: Just a reminder that 1.8.0 will be

Re: [Numpy-discussion] Array addition inconsistency

2013-08-29 Thread Benjamin Root
On Thu, Aug 29, 2013 at 8:04 AM, Robert Kern robert.k...@gmail.com wrote: On Thu, Aug 29, 2013 at 12:00 PM, Martin Luethi lue...@vaw.baug.ethz.ch wrote: Dear all, After some surprise, I noticed an inconsistency while adding array slices: a = np.arange(5) a[1:] = a[1:] + a[:-1]

Re: [Numpy-discussion] Relative speed

2013-08-29 Thread Benjamin Root
On Aug 29, 2013 4:11 PM, Jonathan T. Niehof jnie...@lanl.gov wrote: On 08/29/2013 01:48 PM, Ralf Gommers wrote: Thanks. I had read that quite differently, and I'm sure I'm not the only one. Some context would have helped My apologies--that was a rather obtuse reference. Just for

Re: [Numpy-discussion] Bug (?) converting list to array

2013-09-09 Thread Benjamin Root
The two lists are of different sizes. Had to count twice to catch that. Ben Root On Mon, Sep 9, 2013 at 9:46 AM, Chad Kidder cckid...@gmail.com wrote: I'm trying to enter a 2-D array and np.array() is returning a 1-D array of lists. I'm using Python (x,y) on Windows 7 with numpy 1.7.1.

Re: [Numpy-discussion] PEP8

2013-09-09 Thread Benjamin Root
On Sat, Sep 7, 2013 at 7:56 PM, Charles R Harris charlesr.har...@gmail.comwrote: Hi All, I've been doing some PEP8 work using autopep8. One problem that has turned up is that the default behavior of autopep8 is version dependent. I'd like to put a script in numpy tools that runs autopep8

Re: [Numpy-discussion] can argmax be used to return row and column indices?

2013-09-13 Thread Benjamin Root
On Fri, Sep 13, 2013 at 4:27 AM, Mark Bakker mark...@gmail.com wrote: Thanks, Gregorio. I would like it if argmax had a keyword option to return the row,column index automatically (or whatever the dimension of the array). Afterall, argmax already knows the shape of the array. Calling

Re: [Numpy-discussion] Indexing changes/deprecations

2013-09-27 Thread Benjamin Root
On Fri, Sep 27, 2013 at 8:27 AM, Sebastian Berg sebast...@sipsolutions.netwrote: Hey, since I am working on the indexing. I was wondering about a few smaller things: * 0-d boolean array, `np.array(0)[True]` (will work now) would give np.array([0]) as a copy, instead of the original

Re: [Numpy-discussion] [SciPy-Dev] 1.8.0rc1

2013-10-02 Thread Benjamin Root
On Wed, Oct 2, 2013 at 11:43 AM, Charles R Harris charlesr.har...@gmail.com wrote: Hi Stefan, On Wed, Oct 2, 2013 at 9:29 AM, Stéfan van der Walt ste...@sun.ac.zawrote: Hi Chuck On Tue, Oct 1, 2013 at 1:07 AM, Charles R Harris charlesr.har...@gmail.com wrote: I'll bet the skimage

Re: [Numpy-discussion] Behavior of nan{max, min} and nanarg{max, min} for all-nan slices.

2013-10-02 Thread Benjamin Root
On Wed, Oct 2, 2013 at 1:05 PM, Charles R Harris charlesr.har...@gmail.comwrote: On Wed, Oct 2, 2013 at 10:56 AM, josef.p...@gmail.com wrote: On Wed, Oct 2, 2013 at 12:37 PM, Stéfan van der Walt ste...@sun.ac.za wrote: On 2 Oct 2013 18:04, Charles R Harris charlesr.har...@gmail.com

<    1   2   3   4   5   6   >