Re: [Numpy-discussion] Silent Broadcasting considered harmful

2015-02-09 Thread Chris Barker
On Mon, Feb 9, 2015 at 4:02 PM, cjw wrote: > to overhaul the matrix class > to make it more attractive for numerical linear algebra(?) > > +1 > Sure -- though I don't know that this actually has anyting to do with braodcasting -- unless the idea is that Matrices would be broadcastable? But any

Re: [Numpy-discussion] Silent Broadcasting considered harmful

2015-02-09 Thread cjw
On 09-Feb-15 2:34 AM, Stefan Reiterer wrote: Ok that are indeed some good reasons to keep the status quo, especially since performance is crucial for numpy. It's a dillemma: Using the matrix class for linear algebra would be the correct way for such thing, bu

Re: [Numpy-discussion] new mingw-w64 based numpy and scipy wheel (still experimental)

2015-02-09 Thread Carl Kleffner
Basically you need: (1) site.cfg or %HOME%\.numpy-site.cfg with the following content: (change the paths according to your installation) [openblas] libraries = openblas library_dirs = D:/devel/packages/openblas/amd64/lib include_dirs = D:/devel/packages/openblas/amd64/include OpenBLAS was build

Re: [Numpy-discussion] new mingw-w64 based numpy and scipy wheel (still experimental)

2015-02-09 Thread Sturla Molden
Two quick comments: - You need MSYS or Cygwin to build OpenBLAS. MSYS has uname and perl. Carl probably used MSYS. - BLAS and LAPACK are Fortran libs, hence there are no header files. NumPy and SciPy include their own cblas headers. Sturla Olivier Grisel wrote: > Hi Carl, > > Could you please

Re: [Numpy-discussion] converting a list of tuples into an array of tuples?

2015-02-09 Thread Benjamin Root
Yeah, well, you know Wes... in for a penny, in for a pound (or something like that). Significant portions of pandas already needs Cython, so might as well get as much performance as possible. Btw, the edge case (if you want to call it that), is if it is given an N-dimensional array: >>> import nu

Re: [Numpy-discussion] Silent Broadcasting considered harmful

2015-02-09 Thread Sturla Molden
Chris Barker wrote: > Do you realize that: > > arr = np.ones((5,)) > > ar2 = arr * 5 > > is broadcasting, too? Perhaps we should only warn for a subset of broadcastings? E.g. avoid the warning on scalar times array. I prefer we don't warn about this though, because it might be interpreted a

Re: [Numpy-discussion] converting a list of tuples into an array of tuples?

2015-02-09 Thread Jaime Fernández del Río
On Mon, Feb 9, 2015 at 8:31 AM, Benjamin Root wrote: > I am trying to write up some code that takes advantage of np.tile() on > arbitrary array-like objects. I only want to tile along the first axis. Any > other axis, if they exist, should be left alone. I first coerce the object > using np.asany

Re: [Numpy-discussion] converting a list of tuples into an array of tuples?

2015-02-09 Thread Stephan Hoyer
It appears that the only reliable way to do this may be to use a loop to modify an object arrays in-place. Pandas has a version of this written in Cython: https://github.com/pydata/pandas/blob/c1a0dbc4c0dd79d77b2a34be5bc35493279013ab/pandas/lib.pyx#L342 To quote Wes McKinney "Seriously can't belie

Re: [Numpy-discussion] Silent Broadcasting considered harmful

2015-02-09 Thread Chris Barker
On Sun, Feb 8, 2015 at 2:17 PM, Stefan Reiterer wrote: > Till now the only way out of the misery > is to make proper unit tests, > That's the only way out of the misery of software bugs in general -- nothing special here ;-) Python is a dynamically typed language -- EVERYTHING could do someth

[Numpy-discussion] converting a list of tuples into an array of tuples?

2015-02-09 Thread Benjamin Root
I am trying to write up some code that takes advantage of np.tile() on arbitrary array-like objects. I only want to tile along the first axis. Any other axis, if they exist, should be left alone. I first coerce the object using np.asanyarray(), tile it, and then coerce it back to the original type.

Re: [Numpy-discussion] Silent Broadcasting considered harmful

2015-02-09 Thread R Schumacher
The problem would be human resources to implement it on the doc site; I don't know how PHP people control modern spammers. The current, Pythonic way would be to edit the tutorial when inspired. However http://wiki.scipy.org/Tentative_NumPy_Tutorial reads: "Please do not hesitate to click the edit

Re: [Numpy-discussion] new mingw-w64 based numpy and scipy wheel (still experimental)

2015-02-09 Thread Olivier Grisel
Hi Carl, Could you please provide some details on how you used your mingw-static toolchain to build OpenBLAS, numpy & scipy? I would like to replicate but apparently the default Makefile in the openblas projects expects unix commands such as `uname` and `perl` that are not part of your archive. Di

Re: [Numpy-discussion] Silent Broadcasting considered harmful

2015-02-09 Thread Stefan Reiterer
I suppose API design is never easy if you want to match all needs out there.   If we stick to car examples: My old software engineering professor once stated, that if you drive too fast into a curve, it's the drives fault and not the car. So back to careful testing and dimension checking.  

Re: [Numpy-discussion] Silent Broadcasting considered harmful

2015-02-09 Thread Nathaniel Smith
On 8 Feb 2015 23:34, "Stefan Reiterer" wrote: > > Ok that are indeed some good reasons to keep the status quo, especially since performance is crucial for numpy. > > It's a dillemma: Using the matrix class for linear algebra would be the correct way for such thing, > but the matrix API is not that

Re: [Numpy-discussion] Silent Broadcasting considered harmful

2015-02-09 Thread Sturla Molden
On 09/02/15 08:34, Stefan Reiterer wrote: > So maybe the better way would be not to add warnings to braodcasting > operations, but to overhaul the matrix class > to make it more attractive for numerical linear algebra(?) I think you underestimate the amount of programming this would take. Take a