Re: [Numpy-discussion] 64-bit windows numpy / scipy wheels for testing

2014-07-02 Thread Sturla Molden
On 02/07/14 19:55, Chris Barker wrote: > > Indeed -- the default (i.e what you get with pip install numpy) should > be SSE2 -- I":d much rather have a few folks with old hardware have to > go through some hoops that n have most people get something that is > "much slower than MATLAB". I think we

Re: [Numpy-discussion] Fwd: [Python-ideas] PEP pre-draft: Support for indexing with keyword arguments

2014-07-02 Thread Fernando Perez
Added to the py3 Bof ideas page: https://github.com/ipython/ipython/wiki/Sprints:-SciPy2014-Py3-BoF Thanks for this heads-up! On Wed, Jul 2, 2014 at 11:01 AM, Stephan Hoyer wrote: > NumPy doesn't have named axes, but perhaps it should. See, for example, > Fernando Perez's datarray prototype (

Re: [Numpy-discussion] Accessing irregular sized array data from C

2014-07-02 Thread Sturla Molden
Nathaniel Smith wrote: > Numpy internally does all index/stride calculations in units of bytes, > though, so if accessing the data array directly and using strides, the only > reliable approach is to use intp or equivalent. If we use PyArray_STRIDES we should use npy_intp, yes, because we are co

Re: [Numpy-discussion] Accessing irregular sized array data from C

2014-07-02 Thread Sturla Molden
Chris Barker wrote: > 2) a numpy=based ragged array implementation might make sense as well. You > essentially store the data in a rank-1 shaped numpy array, and provide > custom indexing to get the "rows" out. This would allow you to have all the > data in a single memory block available to C (o

Re: [Numpy-discussion] Accessing irregular sized array data from C

2014-07-02 Thread Nathaniel Smith
On 2 Jul 2014 20:12, "Sturla Molden" wrote: > > Julian Taylor wrote: > > > another thing, don't use int as the index to the array, use npy_intp > > which is large enough to also index arrays > 4GB if the platform > > supports it. > > With double* a 32-bit int can index 16 GB, a 32-bit unsigned in

Re: [Numpy-discussion] Accessing irregular sized array data from C

2014-07-02 Thread Sturla Molden
Julian Taylor wrote: > another thing, don't use int as the index to the array, use npy_intp > which is large enough to also index arrays > 4GB if the platform > supports it. With double* a 32-bit int can index 16 GB, a 32-bit unsigned int can index 32 GB. With char* a 32-bit int can only inde

Re: [Numpy-discussion] numpy.histogram not giving expected results

2014-07-02 Thread Julian Taylor
On 02.07.2014 20:04, Chris Barker wrote: > On Wed, Jul 2, 2014 at 10:36 AM, Julian Taylor > mailto:jtaylor.deb...@googlemail.com>> > wrote: > > we recently fixed a float32/float64 issue in histogram. > https://github.com/numpy/numpy/issues/4799 > > > It's a good idea to keep the edges in

Re: [Numpy-discussion] numpy.histogram not giving expected results

2014-07-02 Thread Chris Barker
On Wed, Jul 2, 2014 at 10:36 AM, Julian Taylor < jtaylor.deb...@googlemail.com> wrote: we recently fixed a float32/float64 issue in histogram. > https://github.com/numpy/numpy/issues/4799 It's a good idea to keep the edges in the same dtype as the input data, it will make for fewer surprises, bu

Re: [Numpy-discussion] Fwd: [Python-ideas] PEP pre-draft: Support for indexing with keyword arguments

2014-07-02 Thread Stephan Hoyer
NumPy doesn't have named axes, but perhaps it should. See, for example, Fernando Perez's datarray prototype (https://github.com/fperez/datarray) or my project, xray (https://github.com/xray/xray). Syntactical support for indexing an axis by name would makes using named axes much more readable. For

Re: [Numpy-discussion] 64-bit windows numpy / scipy wheels for testing

2014-07-02 Thread Chris Barker
On Wed, Jul 2, 2014 at 6:36 AM, Matthew Brett wrote: > > Having a noSSE channel would make sense. > > Indeed -- the default (i.e what you get with pip install numpy) should be SSE2 -- I":d much rather have a few folks with old hardware have to go through some hoops that n have most people get som

Re: [Numpy-discussion] Accessing irregular sized array data from C

2014-07-02 Thread Julian Taylor
On 02.07.2014 13:44, Mads Ipsen wrote: > > > On 02/07/14 12:46, Julian Taylor wrote: >> On Wed, Jul 2, 2014 at 12:15 PM, Mads Ipsen wrote: >>> Hi, >>> >>> If you setup an M x N array like this >>> >>> a = 1.0*numpy.arange(24).reshape(8,3) >>> >>> you can access the data from a C function like

Re: [Numpy-discussion] numpy.histogram not giving expected results

2014-07-02 Thread Julian Taylor
On 02.07.2014 19:29, Chris Barker wrote: > On Wed, Jul 2, 2014 at 7:57 AM, Mark Szepieniec > wrote: > > Looks this could be a float32 vs float64 problem: > > > that would explain it. > > > I guess users always be very careful when mixing floating point >

Re: [Numpy-discussion] 64-bit windows numpy / scipy wheels for testing

2014-07-02 Thread Chris Barker
On Wed, Jul 2, 2014 at 3:37 AM, Matthew Brett wrote: > It looks like > 99% of Windows users do have SSE2 though [1]. So I think what is > required is > > * Build the wheels for 32-bit (easy) > * Patch the wheels to check and give helpful error in absence of SSE2 > (fairly easy) > * Get agreemen

Re: [Numpy-discussion] numpy.histogram not giving expected results

2014-07-02 Thread Chris Barker
On Wed, Jul 2, 2014 at 7:57 AM, Mark Szepieniec wrote: > Looks this could be a float32 vs float64 problem: > that would explain it. > I guess users always be very careful when mixing floating point types, but > should numpy prevent (or warn) the user from doing so in this case? > I don't thin

Re: [Numpy-discussion] Accessing irregular sized array data from C

2014-07-02 Thread Chris Barker
On Wed, Jul 2, 2014 at 3:46 AM, Julian Taylor wrote: > numpy does not directly support irregular shaped arrays (or ragged arrays). > If you look at the result of your example you will see this: > In [5]: b > Out[5]: array([array([ 1., 2., 3.]), array([-2., 4.]), array([ > 5.])], dtype=object)

Re: [Numpy-discussion] numpy.histogram not giving expected results

2014-07-02 Thread Mark Szepieniec
Looks this could be a float32 vs float64 problem: In [19]: data32 = np.array([0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.05, -0.05], dtype=np.float32) In [20]: data64 = np.array([0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.05, -0.05], dtype=np.float64) In [21]: bins32 = np.arange(-0.1, 0.101, 0.05, d

Re: [Numpy-discussion] 64-bit windows numpy / scipy wheels for testing

2014-07-02 Thread Matthew Brett
Hi, On Wed, Jul 2, 2014 at 2:24 PM, Carl Kleffner wrote: > Hi, > > personally I don't have a preference of Binstar over somewhere.org. More > important is that one has to agree where to find the binaries. Binstar has > the concept of channels and allow wheels. So one could provide a channel for >

Re: [Numpy-discussion] 64-bit windows numpy / scipy wheels for testing

2014-07-02 Thread Carl Kleffner
Hi, personally I don't have a preference of Binstar over somewhere.org. More important is that one has to agree where to find the binaries. Binstar has the concept of channels and allow wheels. So one could provide a channel for NOSSE and more channels for other specialized builds: ATLAS/OpenBLAS/

Re: [Numpy-discussion] 64-bit windows numpy / scipy wheels for testing

2014-07-02 Thread Olivier Grisel
Hi Carl, All the items you suggest would be very appreciated. Don't hesitate to ping me if you need me to test new packages. Also the sklearn project has a free Rackspace Cloud account that Matthew is already using to make travis upload OSX wheels for the master branch of various scipy stack proj

Re: [Numpy-discussion] Accessing irregular sized array data from C

2014-07-02 Thread Mads Ipsen
On 02/07/14 12:46, Julian Taylor wrote: > On Wed, Jul 2, 2014 at 12:15 PM, Mads Ipsen wrote: >> Hi, >> >> If you setup an M x N array like this >> >> a = 1.0*numpy.arange(24).reshape(8,3) >> >> you can access the data from a C function like this >> >> void foo(PyObject * numpy_data) >> { >>

Re: [Numpy-discussion] 64-bit windows numpy / scipy wheels for testing

2014-07-02 Thread Matthew Brett
Hi, On Wed, Jul 2, 2014 at 12:18 PM, Carl Kleffner wrote: > Hi, > > The mingw-w64 based wheels (Atlas and openBLAS) are based on a patched numpy > version, that hasn't been published as numpy pull for revision until now (my > failure). I could try to do this tomorrow in the evening. That would b

Re: [Numpy-discussion] 64-bit windows numpy / scipy wheels for testing

2014-07-02 Thread Carl Kleffner
Hi, The mingw-w64 based wheels (Atlas and openBLAS) are based on a patched numpy version, that hasn't been published as numpy pull for revision until now (my failure). I could try to do this tomorrow in the evening. Another important point is, that the toolchain, that is capable to compile numpy/s

Re: [Numpy-discussion] Accessing irregular sized array data from C

2014-07-02 Thread Julian Taylor
On Wed, Jul 2, 2014 at 12:15 PM, Mads Ipsen wrote: > Hi, > > If you setup an M x N array like this > > a = 1.0*numpy.arange(24).reshape(8,3) > > you can access the data from a C function like this > > void foo(PyObject * numpy_data) > { > // Get dimension and data pointer > int const m =

Re: [Numpy-discussion] 64-bit windows numpy / scipy wheels for testing

2014-07-02 Thread Matthew Brett
Hi, On Wed, Jul 2, 2014 at 11:29 AM, Matthew Brett wrote: > Hi, > > On Wed, Jul 2, 2014 at 10:36 AM, Carl Kleffner wrote: >> Hi all, >> >> I do regulary builds for python-2.7. Due to my limited resources I didn't >> build for 3.3 or 3.4 right now. I didn't updated my toolchhain from >> february,

Re: [Numpy-discussion] 64-bit windows numpy / scipy wheels for testing

2014-07-02 Thread Matthew Brett
Hi, On Wed, Jul 2, 2014 at 10:36 AM, Carl Kleffner wrote: > Hi all, > > I do regulary builds for python-2.7. Due to my limited resources I didn't > build for 3.3 or 3.4 right now. I didn't updated my toolchhain from > february, but I do regulary builds of OpenBLAS. OpenBLAS is under heavy > devel

[Numpy-discussion] Accessing irregular sized array data from C

2014-07-02 Thread Mads Ipsen
Hi, If you setup an M x N array like this a = 1.0*numpy.arange(24).reshape(8,3) you can access the data from a C function like this void foo(PyObject * numpy_data) { // Get dimension and data pointer int const m = static_cast(PyArray_DIMS(numpy_data)[0]); int const n = static_cast

Re: [Numpy-discussion] 64-bit windows numpy / scipy wheels for testing

2014-07-02 Thread Carl Kleffner
Hi all, I do regulary builds for python-2.7. Due to my limited resources I didn't build for 3.3 or 3.4 right now. I didn't updated my toolchhain from february, but I do regulary builds of OpenBLAS. OpenBLAS is under heavy development right now, thanks to Werner Saar, see: https://github.com/wernsa

[Numpy-discussion] Fwd: [Python-ideas] PEP pre-draft: Support for indexing with keyword arguments

2014-07-02 Thread Nathaniel Smith
There's some discussion on python-ideas about making it possible for python indexing to accept kwargs, eg arr[1:2, foo=bar] Since numpy is a very heavy user of indexing which might benefit from this, I thought I should forward it here. If we have clear use cases for such a feature then that ma

Re: [Numpy-discussion] numpy.histogram not giving expected results

2014-07-02 Thread Mark Szepieniec
Hi Catherine, I can't reproduce your issue with bins_list vs. bins_arange, but passing both range and number of bins to np.histogram does give the same strange behavior for me: In [16]: data = np.array([ 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0.05, -0.05]) I

Re: [Numpy-discussion] 64-bit windows numpy / scipy wheels for testing

2014-07-02 Thread Olivier Grisel
Hi Matthew and Ralf, Has anyone managed to build working whl packages for numpy and scipy on win32 using the static mingw-w64 toolchain? -- Olivier ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/nump