[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

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(). The help text

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 n...@pobox.com wrote: On Mon, Mar 24, 2014 at 11:58 PM, Charles R Harris charlesr.har...@gmail.com wrote: On Mon, Mar 24, 2014 at 5:56 PM, Nathaniel Smith n...@pobox.com wrote: On Sat, Mar 22, 2014 at 6:13 PM, Nathaniel Smith n...@pobox.com

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 sebast...@sipsolutions.net 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

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 matthew.br...@gmail.comwrote: 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:

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 n...@pobox.com 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

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 chris.bar...@noaa.gov 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 *

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 chris.bar...@noaa.gov 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

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 ndar...@mac.com wrote: On Tue, Apr 1, 2014 at 12:10 PM, Chris Barker chris.bar...@noaa.gov 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

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 chris.bar...@noaa.gov wrote: On Mon, Mar 31, 2014 at 3:09 PM, Matthew Brett matthew.br...@gmail.com wrote: I am hopelessly lost here, but it looks as though Python extension modules get loaded via hDLL = LoadLibraryEx(pathname, NULL,

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 matthew.br...@gmail.com 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

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 n...@pobox.com wrote: On Tue, Apr 1, 2014 at 6:26 PM, Matthew Brett matthew.br...@gmail.com wrote: I'm guessing that the LOAD_WITH_ALTERED_SEARCH_PATH means that a DLL loaded via: hDLL = LoadLibraryEx(pathname, NULL,

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

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

[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

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 n...@pobox.com 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

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

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

2014-04-01 Thread Sturla Molden
Haslwanter Thomas thomas.haslwan...@fh-linz.at 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.

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 sturla.mol...@gmail.comwrote: Haslwanter Thomas thomas.haslwan...@fh-linz.at wrote: Personally I

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 sturla.mol...@gmail.com wrote: Haslwanter Thomas thomas.haslwan...@fh-linz.at 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

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 sebast...@sipsolutions.net 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

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 sebast...@sipsolutions.net 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

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 n...@pobox.com wrote: On Tue, Apr 1, 2014 at 9:02 PM, Sturla Molden sturla.mol...@gmail.com wrote: Haslwanter Thomas thomas.haslwan...@fh-linz.at wrote: Personally I cannot think of many applications where it would be desired to calculate

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 n...@pobox.com wrote: On Tue, Apr 1, 2014 at 9:02 PM, Sturla Molden sturla.mol...@gmail.com wrote: Haslwanter Thomas thomas.haslwan...@fh-linz.at wrote: Personally I cannot think of many applications where it would be desired to calculate

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 ralf.gomm...@gmail.com wrote: On Tue, Apr 1, 2014 at 10:08 PM, Nathaniel Smith n...@pobox.com wrote: On Tue, Apr 1, 2014 at 9:02 PM, Sturla Molden sturla.mol...@gmail.com wrote: Haslwanter Thomas thomas.haslwan...@fh-linz.at wrote:

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 charlesr.har...@gmail.com wrote: On Tue, Apr 1, 2014 at 2:08 PM, Nathaniel Smith n...@pobox.com wrote: On Tue, Apr 1, 2014 at 9:02 PM, Sturla Molden sturla.mol...@gmail.com wrote: Haslwanter Thomas thomas.haslwan...@fh-linz.at wrote:

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 sebast...@sipsolutions.net wrote: On Di, 2014-04-01 at 16:25 +0100, Nathaniel Smith wrote: On Tue, Apr 1, 2014 at 3:57 PM, Sebastian Berg sebast...@sipsolutions.net wrote: If `a` has exactly one dimension more then `b`, the first case is used.

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 n...@pobox.com wrote: On Tue, Apr 1, 2014 at 9:51 PM, Ralf Gommers ralf.gomm...@gmail.com wrote: On Tue, Apr 1, 2014 at 10:08 PM, Nathaniel Smith n...@pobox.com wrote: On Tue, Apr 1, 2014 at 9:02 PM, Sturla Molden sturla.mol...@gmail.com

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 n...@pobox.com wrote: On Tue, Apr 1, 2014 at 6:26 PM, Matthew Brett matthew.br...@gmail.com wrote: I'm guessing that the LOAD_WITH_ALTERED_SEARCH_PATH means that a DLL loaded via: hDLL = LoadLibraryEx(pathname, NULL,

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 courn...@gmail.com wrote: On Tue, Apr 1, 2014 at 6:43 PM, Nathaniel Smith n...@pobox.com wrote: On Tue, Apr 1, 2014 at 6:26 PM, Matthew Brett matthew.br...@gmail.com wrote: I'm guessing that the LOAD_WITH_ALTERED_SEARCH_PATH means that a DLL

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 n...@pobox.com wrote: On Tue, Apr 1, 2014 at 11:58 PM, David Cournapeau courn...@gmail.com wrote: On Tue, Apr 1, 2014 at 6:43 PM, Nathaniel Smith n...@pobox.com wrote: On Tue, Apr 1, 2014 at 6:26 PM, Matthew Brett matthew.br...@gmail.com