[Numpy-discussion] flip array on axis

2013-07-10 Thread Andreas Hilboll
Hi, there are np.flipud and np.fliplr methods to flip 2d arrays on the first and second dimension, respectively. What can I do to flip an array on an axis which I don't know before runtime? I'd really like to see a np.flip(arr, axis) method which lets me specify which axis to flip on. Any ideas?

Re: [Numpy-discussion] flip array on axis

2013-07-10 Thread Matthew Brett
Hi, On Wed, Jul 10, 2013 at 11:02 AM, Andreas Hilboll li...@hilboll.de wrote: Hi, there are np.flipud and np.fliplr methods to flip 2d arrays on the first and second dimension, respectively. What can I do to flip an array on an axis which I don't know before runtime? I'd really like to see a

[Numpy-discussion] f2py and setup.py how can I specify where the .so file goes?

2013-07-10 Thread Jose Gomez-Dans
Hi, I am building a package that exposes some Fortran libraries through f2py. The packages directory looks like this: setup.py my_pack/ | |--__init__.py |-- some.pyf |--- code.f90 I thoughat that once installed, I'd get the .so and __init__.py in the same directory

Re: [Numpy-discussion] flip array on axis

2013-07-10 Thread Andreas Hilboll
On 10.07.2013 17:06, Matthew Brett wrote: Hi, On Wed, Jul 10, 2013 at 11:02 AM, Andreas Hilboll li...@hilboll.de wrote: Hi, there are np.flipud and np.fliplr methods to flip 2d arrays on the first and second dimension, respectively. What can I do to flip an array on an axis which I don't

Re: [Numpy-discussion] Unique() function and avoiding Loop

2013-07-10 Thread Aronne Merrelli
On Fri, Jul 5, 2013 at 4:20 AM, Bakhtiyor Zokhidov bakhtiyor_zokhi...@mail.ru wrote: Hi everybody, I have a problem with sorting out the following function. What I expect is that I showed as an example below. Two problems are encountered to achieve the result: 1) The function sometimes

Re: [Numpy-discussion] flip array on axis

2013-07-10 Thread Warren Weckesser
On Wed, Jul 10, 2013 at 12:03 PM, Andreas Hilboll li...@hilboll.de wrote: On 10.07.2013 17:06, Matthew Brett wrote: Hi, On Wed, Jul 10, 2013 at 11:02 AM, Andreas Hilboll li...@hilboll.de wrote: Hi, there are np.flipud and np.fliplr methods to flip 2d arrays on the first and second

[Numpy-discussion] ufunc overrides

2013-07-10 Thread Blake Griffith
Hello NumPy, Part of my GSoC is compatibility with SciPy's sparse matrices and NumPy's ufuncs. Currently there is no feasible way to do this without changing ufuncs a bit. I've been considering a mechanism to override ufuncs based on checking the ufuncs arguments for a __ufunc_override__

Re: [Numpy-discussion] ufunc overrides

2013-07-10 Thread Travis Oliphant
Hey Blake, To be clear, my blog-post is just a pre-NEP and should not be perceived as something that will transpire in NumPy anytime soon.You should take it as a hey everyone, I think I know how to solve this problem, but I have no time to do it, but wanted to get the word out to those who