Re: [Numpy-discussion] ANN: NumPy 1.8.1 release

2014-04-01 Thread Matthew Brett
Hi, On Tue, Apr 1, 2014 at 4:46 PM, David Cournapeau wrote: > > > > On Wed, Apr 2, 2014 at 12:36 AM, Nathaniel Smith wrote: >> >> On Tue, Apr 1, 2014 at 11:58 PM, David Cournapeau >> wrote: >> > On Tue, Apr 1, 2014 at 6:43 PM, Nathaniel Smith wrote: >> >> >> >> On Tue, Apr 1, 2014 at 6:26 PM,

Re: [Numpy-discussion] ANN: NumPy 1.8.1 release

2014-04-01 Thread David Cournapeau
On Wed, Apr 2, 2014 at 12:36 AM, Nathaniel Smith wrote: > On Tue, Apr 1, 2014 at 11:58 PM, David Cournapeau > wrote: > > On Tue, Apr 1, 2014 at 6:43 PM, Nathaniel Smith wrote: > >> > >> On Tue, Apr 1, 2014 at 6:26 PM, Matthew Brett > >> wrote: > >> > I'm guessing that the LOAD_WITH_ALTERED_SEA

Re: [Numpy-discussion] ANN: NumPy 1.8.1 release

2014-04-01 Thread Nathaniel Smith
On Tue, Apr 1, 2014 at 11:58 PM, David Cournapeau wrote: > On Tue, Apr 1, 2014 at 6:43 PM, Nathaniel Smith wrote: >> >> On Tue, Apr 1, 2014 at 6:26 PM, Matthew Brett >> wrote: >> > I'm guessing that the LOAD_WITH_ALTERED_SEARCH_PATH means that a DLL >> > loaded via: >> > >> > hDLL = LoadLibraryE

Re: [Numpy-discussion] ANN: NumPy 1.8.1 release

2014-04-01 Thread David Cournapeau
On Tue, Apr 1, 2014 at 6:43 PM, Nathaniel Smith wrote: > On Tue, Apr 1, 2014 at 6:26 PM, Matthew Brett > wrote: > > I'm guessing that the LOAD_WITH_ALTERED_SEARCH_PATH means that a DLL > loaded via: > > > > hDLL = LoadLibraryEx(pathname, NULL, LOAD_WITH_ALTERED_SEARCH_PATH); > > > > will in tur

Re: [Numpy-discussion] Standard Deviation (std): Suggested change for "ddof" default value

2014-04-01 Thread josef . pktd
On Tue, Apr 1, 2014 at 5:11 PM, Nathaniel Smith wrote: > On Tue, Apr 1, 2014 at 9:51 PM, Ralf Gommers wrote: >> >> >> >> On Tue, Apr 1, 2014 at 10:08 PM, Nathaniel Smith wrote: >>> >>> On Tue, Apr 1, 2014 at 9:02 PM, Sturla Molden >>> wrote: >>> > Haslwanter Thomas wrote: >>> > >>> >> Personal

Re: [Numpy-discussion] Confused by spec of numpy.linalg.solve

2014-04-01 Thread Nathaniel Smith
On Tue, Apr 1, 2014 at 9:50 PM, Sebastian Berg wrote: > On Di, 2014-04-01 at 16:25 +0100, Nathaniel Smith wrote: >> On Tue, Apr 1, 2014 at 3:57 PM, Sebastian Berg >> wrote: >> > If `a` has exactly one dimension more then `b`, the first case is used. >> > Otherwise (..., M, K) is used instead. To

Re: [Numpy-discussion] Standard Deviation (std): Suggested change for "ddof" default value

2014-04-01 Thread alex
On Tue, Apr 1, 2014 at 4:54 PM, Charles R Harris wrote: > > > > On Tue, Apr 1, 2014 at 2:08 PM, Nathaniel Smith wrote: >> >> On Tue, Apr 1, 2014 at 9:02 PM, Sturla Molden >> wrote: >> > Haslwanter Thomas wrote: >> > >> >> Personally I cannot think of many applications where it would be >> >> de

Re: [Numpy-discussion] Standard Deviation (std): Suggested change for "ddof" default value

2014-04-01 Thread Nathaniel Smith
On Tue, Apr 1, 2014 at 9:51 PM, Ralf Gommers wrote: > > > > On Tue, Apr 1, 2014 at 10:08 PM, Nathaniel Smith wrote: >> >> On Tue, Apr 1, 2014 at 9:02 PM, Sturla Molden >> wrote: >> > Haslwanter Thomas wrote: >> > >> >> Personally I cannot think of many applications where it would be >> >> desir

Re: [Numpy-discussion] Standard Deviation (std): Suggested change for "ddof" default value

2014-04-01 Thread Charles R Harris
On Tue, Apr 1, 2014 at 2:08 PM, Nathaniel Smith wrote: > On Tue, Apr 1, 2014 at 9:02 PM, Sturla Molden > wrote: > > Haslwanter Thomas wrote: > > > >> Personally I cannot think of many applications where it would be desired > >> to calculate the standard deviation with ddof=0. In addition, I fee

Re: [Numpy-discussion] Standard Deviation (std): Suggested change for "ddof" default value

2014-04-01 Thread Ralf Gommers
On Tue, Apr 1, 2014 at 10:08 PM, Nathaniel Smith wrote: > On Tue, Apr 1, 2014 at 9:02 PM, Sturla Molden > wrote: > > Haslwanter Thomas wrote: > > > >> Personally I cannot think of many applications where it would be desired > >> to calculate the standard deviation with ddof=0. In addition, I fe

Re: [Numpy-discussion] Confused by spec of numpy.linalg.solve

2014-04-01 Thread Sebastian Berg
On Di, 2014-04-01 at 16:25 +0100, Nathaniel Smith wrote: > On Tue, Apr 1, 2014 at 3:57 PM, Sebastian Berg > wrote: > > If `a` has exactly one dimension more then `b`, the first case is used. > > Otherwise (..., M, K) is used instead. To make sure you always get the > > expected result, it may be b

Re: [Numpy-discussion] Confused by spec of numpy.linalg.solve

2014-04-01 Thread Bob Dowling
On 04/01/2014 04:25 PM, Nathaniel Smith wrote: > On Tue, Apr 1, 2014 at 3:57 PM, Sebastian Berg > wrote: >> If `a` has exactly one dimension more then `b`, the first case is used. >> Otherwise (..., M, K) is used instead. To make sure you always get the >> expected result, it may be best to make s

Re: [Numpy-discussion] Standard Deviation (std): Suggested change for "ddof" default value

2014-04-01 Thread Nathaniel Smith
On Tue, Apr 1, 2014 at 9:02 PM, Sturla Molden wrote: > Haslwanter Thomas wrote: > >> Personally I cannot think of many applications where it would be desired >> to calculate the standard deviation with ddof=0. In addition, I feel that >> there should be consistency between standard modules such a

Re: [Numpy-discussion] Standard Deviation (std): Suggested change for "ddof" default value

2014-04-01 Thread Eelco Hoogendoorn
I agree; breaking code over this would be ridiculous. Also, I prefer the zero default, despite the mean/std combo probably being more common. On Tue, Apr 1, 2014 at 10:02 PM, Sturla Molden wrote: > Haslwanter Thomas wrote: > > > Personally I cannot think of many applications where it would be d

Re: [Numpy-discussion] Standard Deviation (std): Suggested change for "ddof" default value

2014-04-01 Thread Sturla Molden
Haslwanter Thomas wrote: > Personally I cannot think of many applications where it would be desired > to calculate the standard deviation with ddof=0. In addition, I feel that > there should be consistency between standard modules such as numpy, scipy, > and pandas. ddof=0 is the maxiumum likel

Re: [Numpy-discussion] Standard Deviation (std): Suggested change for "ddof" default value

2014-04-01 Thread Benjamin Root
Because np.mean() is ddof=0? (I mean effectively, not that it actually has a parameter for that) There is consistency within the library, and I certainly wouldn't want to have NaN all of the sudden coming from my calls to mean() that I apply to an arbitrary non-empty array of values that happened t

Re: [Numpy-discussion] Dates and times and Datetime64 (again)

2014-04-01 Thread Alexander Belopolsky
On Tue, Apr 1, 2014 at 1:12 PM, Nathaniel Smith wrote: > In [6]: a[0] = "garbage" > ValueError: could not convert string to float: garbage > > (Cf, "Errors should never pass silently".) Any reason why datetime64 > should be different? > datetime64 is different because it has NaT support from the

[Numpy-discussion] Standard Deviation (std): Suggested change for "ddof" default value

2014-04-01 Thread Haslwanter Thomas
While most other Python applications (scipy, pandas) use for the calculation of the standard deviation the default "ddof=1" (i.e. they calculate the sample standard deviation), the Numpy implementation uses the default "ddof=0". Personally I cannot think of many applications where it would be des

Re: [Numpy-discussion] ANN: NumPy 1.8.1 release

2014-04-01 Thread Matthew Brett
Hi, I just noticed this C reference implementation of blas: https://github.com/rljames/coblas No lapack, no benchmarks, but tests, and BSD. I wonder if it is possible to craft a Frankenlibrary from OpenBLAS and reference implementations to avoid broken parts of OpenBLAS? Cheers, Matthew _

Re: [Numpy-discussion] Dates and times and Datetime64 (again)

2014-04-01 Thread Sankarshan Mudkavi
I agree with that interpretation of naive as well. I'll change the proposal to reflect that. So any modifier should raise an error then? (At the risk of breaking people's code.) The only question is, should we consider accepting the modifier and disregard it with a warning, letting the user kno

Re: [Numpy-discussion] ANN: NumPy 1.8.1 release

2014-04-01 Thread Matthew Brett
Hi, On Tue, Apr 1, 2014 at 10:43 AM, Nathaniel Smith wrote: > On Tue, Apr 1, 2014 at 6:26 PM, Matthew Brett wrote: >> I'm guessing that the LOAD_WITH_ALTERED_SEARCH_PATH means that a DLL loaded >> via: >> >> hDLL = LoadLibraryEx(pathname, NULL, LOAD_WITH_ALTERED_SEARCH_PATH); >> >> will in tur

Re: [Numpy-discussion] ANN: NumPy 1.8.1 release

2014-04-01 Thread Nathaniel Smith
On Tue, Apr 1, 2014 at 6:26 PM, Matthew Brett wrote: > I'm guessing that the LOAD_WITH_ALTERED_SEARCH_PATH means that a DLL loaded > via: > > hDLL = LoadLibraryEx(pathname, NULL, LOAD_WITH_ALTERED_SEARCH_PATH); > > will in turn (by default) search for its dependent DLLs in their own > directory.

Re: [Numpy-discussion] ANN: NumPy 1.8.1 release

2014-04-01 Thread Matthew Brett
Hi, On Tue, Apr 1, 2014 at 9:04 AM, Chris Barker wrote: > On Mon, Mar 31, 2014 at 3:09 PM, Matthew Brett > wrote: >> >> I am hopelessly lost here, but it looks as though Python extension >> modules get loaded via >> >> hDLL = LoadLibraryEx(pathname, NULL, >> LOAD

Re: [Numpy-discussion] Dates and times and Datetime64 (again)

2014-04-01 Thread Nathaniel Smith
On Tue, Apr 1, 2014 at 5:22 PM, Alexander Belopolsky wrote: > > On Tue, Apr 1, 2014 at 12:10 PM, Chris Barker wrote: >> >> It seems this committee of two has come to a consensus on naive -- and >> you're probably right, raise an exception if there is a time zone specifier. > > > Count me as +1 on

Re: [Numpy-discussion] Dates and times and Datetime64 (again)

2014-04-01 Thread Alexander Belopolsky
On Tue, Apr 1, 2014 at 12:10 PM, Chris Barker wrote: > It seems this committee of two has come to a consensus on naive -- and > you're probably right, raise an exception if there is a time zone specifier. Count me as +1 on naive, but consider converting garbage (including strings with trailing

Re: [Numpy-discussion] Dates and times and Datetime64 (again)

2014-04-01 Thread Alexander Belopolsky
On Tue, Apr 1, 2014 at 12:10 PM, Chris Barker wrote: > "For a naive object, the %z and %Z format codes are replaced by empty > strings." > > though I'm not entirely sure what that means -- probably only for writing. > That's right: >>> from datetime import * >>> datetime.now().strftime('%z') '

Re: [Numpy-discussion] Dates and times and Datetime64 (again)

2014-04-01 Thread Chris Barker
On Mon, Mar 31, 2014 at 7:19 PM, Nathaniel Smith wrote: > > The difference is that datetime.datetime doesn't provide any iso string > parsing. > > Sure it does. datetime.strptime, with the %z modifier in particular. > that's not ISO parsing, that's parsing according to a user-defined format stri

Re: [Numpy-discussion] ANN: NumPy 1.8.1 release

2014-04-01 Thread Chris Barker
On Mon, Mar 31, 2014 at 3:09 PM, Matthew Brett wrote: > I am hopelessly lost here, but it looks as though Python extension > modules get loaded via > > hDLL = LoadLibraryEx(pathname, NULL, > LOAD_WITH_ALTERED_SEARCH_PATH); > > See: > http://hg.python.org/cpython/fi

Re: [Numpy-discussion] Confused by spec of numpy.linalg.solve

2014-04-01 Thread Nathaniel Smith
On Tue, Apr 1, 2014 at 3:57 PM, Sebastian Berg wrote: > If `a` has exactly one dimension more then `b`, the first case is used. > Otherwise (..., M, K) is used instead. To make sure you always get the > expected result, it may be best to make sure that the number of > broadcasting (...) dimensions

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

2014-04-01 Thread Charles R Harris
On Mon, Mar 24, 2014 at 6:33 PM, Nathaniel Smith wrote: > On Mon, Mar 24, 2014 at 11:58 PM, Charles R Harris > wrote: > > On Mon, Mar 24, 2014 at 5:56 PM, Nathaniel Smith wrote: > >> > >> On Sat, Mar 22, 2014 at 6:13 PM, Nathaniel Smith wrote: > >> > After 88 emails we don't have a conclusion

Re: [Numpy-discussion] Confused by spec of numpy.linalg.solve

2014-04-01 Thread Sebastian Berg
On Di, 2014-04-01 at 15:31 +0100, Bob Dowling wrote: > Versions: > > >>> sys.version > '3.3.2 (default, Mar 5 2014, 08:21:05) \n[GCC 4.8.2 20131212 (Red Hat > 4.8.2-7)]' > > >>> numpy.__version__ > '1.8.0' > > > > Problem: > > I'm trying to unpick the shape requirements of numpy.linalg.solve

[Numpy-discussion] Confused by spec of numpy.linalg.solve

2014-04-01 Thread Bob Dowling
Versions: >>> sys.version '3.3.2 (default, Mar 5 2014, 08:21:05) \n[GCC 4.8.2 20131212 (Red Hat 4.8.2-7)]' >>> numpy.__version__ '1.8.0' Problem: I'm trying to unpick the shape requirements of numpy.linalg.solve(). The help text says: solve(a, b) - a : (..., M, M) array_like C