Re: [Numpy-discussion] `allclose` vs `assert_allclose`

2014-07-17 Thread Ralf Gommers
On Wed, Jul 16, 2014 at 6:37 AM, Tony Yu tsy...@gmail.com wrote: Is there any reason why the defaults for `allclose` and `assert_allclose` differ? This makes debugging a broken test much more difficult. More importantly, using an absolute tolerance of 0 causes failures for some common cases.

Re: [Numpy-discussion] `allclose` vs `assert_allclose`

2014-07-17 Thread Nathaniel Smith
On 16 Jul 2014 10:26, Tony Yu tsy...@gmail.com wrote: Is there any reason why the defaults for `allclose` and `assert_allclose` differ? This makes debugging a broken test much more difficult. More importantly, using an absolute tolerance of 0 causes failures for some common cases. For example,

Re: [Numpy-discussion] String type again.

2014-07-17 Thread Joseph Martinot-Lagarde
Le 15/07/2014 18:18, Chris Barker a écrit : (or does HDF support var-length elements?) It does: http://www.hdfgroup.org/HDF5/doc/TechNotes/VLTypes.html ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org

Re: [Numpy-discussion] String type again.

2014-07-17 Thread Andrew Collette
Hi, good argument for ASCII, but utf-8 is a bad idea, as there is no 1:1 correspondence between length of string in bytes and length in characters -- as numpy needs to pre-allocate a defined number of bytes for a dtype, there is a disconnect between the user and numpy as to how long a string is

[Numpy-discussion] Numpy BoF at SciPy 2014 - quick report

2014-07-17 Thread Fernando Perez
Hi all, sorry for not posting earlier, post-conference InboxInfinity blues and all that... The BoF did go as planned, and it was a good discussion, mostly following the tentative agenda outlined here: https://github.com/numpy/numpy/wiki/Numpy-BoF-at-Scipy-2014 Various folks were kind enough to

Re: [Numpy-discussion] Bug in np.cross for 2D vectors

2014-07-17 Thread Sebastian Berg
On Di, 2014-07-15 at 10:22 +0100, Neil Hodgson wrote: Hi, We came across this bug while using np.cross on 3D arrays of 2D vectors. Hi, which numpy version are you using? Until recently, the cross product simply did *not* work in a broadcasting manner (3d arrays of 2d vectors), it did

Re: [Numpy-discussion] __numpy_ufunc__

2014-07-17 Thread Sebastian Berg
On Mi, 2014-07-16 at 09:07 +0100, Nathaniel Smith wrote: Weirdly, I never received Chuck's original email in this thread. Should some list admin be informed? I send some mails yesterday and they never arrived... Not sure if it is a problem on my side or not. I also am not sure what/where

Re: [Numpy-discussion] String type again.

2014-07-17 Thread Charles R Harris
On Tue, Jul 15, 2014 at 5:26 AM, Sebastian Berg sebast...@sipsolutions.net wrote: On Sa, 2014-07-12 at 12:17 -0500, Charles R Harris wrote: As previous posts have pointed out, Numpy's `S` type is currently treated as a byte string, which leads to more complicated code in python3. OTOH, the

Re: [Numpy-discussion] String type again.

2014-07-17 Thread Todd
On Jul 16, 2014 11:43 AM, Chris Barker chris.bar...@noaa.gov wrote: So numpy should have dtypes to match these. We're a bit stuck, however, because 'S' mapped to the py2 string type, which no longer exists in py3. Sorry not running py3 to see what 'S' does now, but I know it's bit broken, and may

Re: [Numpy-discussion] __numpy_ufunc__ and 1.9 release

2014-07-17 Thread Pauli Virtanen
Hi, 15.07.2014 21:06, Julian Taylor kirjoitti: [clip: __numpy_ufunc__] So I'm wondering if we should delay the introduction of this feature to 1.10 or is it important enough to wait until there is a consensus on the remaining issues? My 10c: The feature is not so much in hurry that it alone

[Numpy-discussion] Mailing list slowdown (was Re: __numpy_ufunc__)

2014-07-17 Thread Nathaniel Smith
On 17 Jul 2014 11:51, Sebastian Berg sebast...@sipsolutions.net wrote: On Mi, 2014-07-16 at 09:07 +0100, Nathaniel Smith wrote: Weirdly, I never received Chuck's original email in this thread. Should some list admin be informed? I send some mails yesterday and they never arrived... Not

Re: [Numpy-discussion] Bug in np.cross for 2D vectors

2014-07-17 Thread Neil Hodgson
Hi, We came across this bug while using np.cross on 3D arrays of 2D vectors. What version of numpy are you using? This should already be solved in numpy master, and be part of the 1.9 release. Here's the relevant commit, although the code has been cleaned up a bit in later ones:

Re: [Numpy-discussion] String type again.

2014-07-17 Thread Aldcroft, Thomas
On Wed, Jul 16, 2014 at 6:48 AM, Todd toddr...@gmail.com wrote: On Jul 16, 2014 11:43 AM, Chris Barker chris.bar...@noaa.gov wrote: So numpy should have dtypes to match these. We're a bit stuck, however, because 'S' mapped to the py2 string type, which no longer exists in py3. Sorry not

Re: [Numpy-discussion] String type again.

2014-07-17 Thread Chris Barker
On Tue, Jul 15, 2014 at 4:26 AM, Sebastian Berg sebast...@sipsolutions.net wrote: Just wondering, couldn't we have a type which actually has an (arbitrary, python supported) encoding (and bytes might even just be a special case of no encoding)? well, then we're back to the core issue here:

Re: [Numpy-discussion] String type again.

2014-07-17 Thread Stephan Hoyer
On Mon, Jul 14, 2014 at 10:00 AM, Olivier Grisel olivier.gri...@ensta.org wrote: 2014-07-13 19:05 GMT+02:00 Alexander Belopolsky ndar...@mac.com: I've been toying with the idea of creating an array type for interned strings. In many applications dealing with large arrays of variable size

Re: [Numpy-discussion] Bug in np.cross for 2D vectors

2014-07-17 Thread Neil Hodgson
Hi, We came across this bug while using np.cross on 3D arrays of 2D vectors. What version of numpy are you using? This should already be solved in numpy master, and be part of the 1.9 release. Here's the relevant commit, although the code has been cleaned up a bit in later ones:

Re: [Numpy-discussion] [SciPy-Dev] __numpy_ufunc__ and 1.9 release

2014-07-17 Thread Nathaniel Smith
On Tue, Jul 15, 2014 at 7:06 PM, Julian Taylor jtaylor.deb...@googlemail.com wrote: hi, as you may know we want to release numpy 1.9 soon. We should have solved most indexing regressions the first beta showed. The remaining blockers are finishing the new __numpy_ufunc__ feature. This feature