[Numpy-discussion] Help in understanding

2015-08-13 Thread subro
Hi, I am new to NumPy, Can someone help me in understanding below code. >>> names = np.array(['Bob', 'Joe', 'Will', 'Bob', 'Will', 'Joe', 'Joe']) >>> data = np.random.random((7,4)) >>> print data [[ 0.85402649 0.12827655 0.580 0.86288236] [ 0.30162683 0.45269508 0.98098039 0.1291469

Re: [Numpy-discussion] Changes to np.digitize since NumPy 1.9?

2015-08-13 Thread Jaime Fernández del Río
On Thu, Aug 13, 2015 at 9:57 AM, Jaime Fernández del Río < jaime.f...@gmail.com> wrote: > On Thu, Aug 13, 2015 at 7:59 AM, Nathan Goldbaum > wrote: > >> >> >> On Thu, Aug 13, 2015 at 9:44 AM, Charles R Harris < >> charlesr.har...@gmail.com> wrote: >> >>> >>> >>> On Thu, Aug 13, 2015 at 12:09 AM,

Re: [Numpy-discussion] [SciPy-Dev] ANN: Numpy 1.10.0b1 release

2015-08-13 Thread Charles R Harris
On Thu, Aug 13, 2015 at 4:34 PM, Matthew Brett wrote: > On Thu, Aug 13, 2015 at 1:04 PM, Matthew Brett > wrote: > > Hi, > > > > On Wed, Aug 12, 2015 at 12:23 PM, Sebastian Berg > > wrote: > >> On Mi, 2015-08-12 at 01:07 -0700, Nathaniel Smith wrote: > >>> On Wed, Aug 12, 2015 at 12:51 AM, Sebas

Re: [Numpy-discussion] [SciPy-Dev] ANN: Numpy 1.10.0b1 release

2015-08-13 Thread Matthew Brett
On Thu, Aug 13, 2015 at 1:04 PM, Matthew Brett wrote: > Hi, > > On Wed, Aug 12, 2015 at 12:23 PM, Sebastian Berg > wrote: >> On Mi, 2015-08-12 at 01:07 -0700, Nathaniel Smith wrote: >>> On Wed, Aug 12, 2015 at 12:51 AM, Sebastian Berg >>> wrote: >>> > On Mi, 2015-08-12 at 09:41 +0200, Jens Jørge

Re: [Numpy-discussion] Problems using add_npy_pkg_config

2015-08-13 Thread Ralf Gommers
On Thu, Aug 13, 2015 at 8:45 PM, Christian Engwer < christian.eng...@uni-muenster.de> wrote: > > >> This doesn't answer your question but: why? If you're not > distributing a > > >> Python project, there is no reason to use distutils instead of a sane > build > > >> system. > > > > Come on. We don

Re: [Numpy-discussion] Multiarray API size mismatch 301 302?

2015-08-13 Thread Sebastian Berg
So as Julian helped me, it was the wrong style of the function, the curly bracket has to go on the next line for the API generation to pick it up. - Sebastian On Do, 2015-08-13 at 20:42 +0200, Sebastian Berg wrote: > On Do, 2015-08-13 at 14:36 -0400, Benjamin Root wrote: > > Did you do a "git cle

Re: [Numpy-discussion] f2py and callbacks with variables

2015-08-13 Thread Pearu Peterson
Hi Casey, On Wed, Aug 12, 2015 at 11:46 PM, Casey Deen wrote: > Hi Pearu- > >Thanks so much! This works! Can you point me to a reference for the > format of the .pyf files? My ~day of searching found a few pages on the > scipy website, but nothing which went into this amount of detail. >

Re: [Numpy-discussion] Problems using add_npy_pkg_config

2015-08-13 Thread Christian Engwer
> >> This doesn't answer your question but: why? If you're not distributing a > >> Python project, there is no reason to use distutils instead of a sane build > >> system. > > Come on. We don't take it seriously, and neither do the Python core devs. > It's also pretty much completely unsupported.

Re: [Numpy-discussion] Multiarray API size mismatch 301 302?

2015-08-13 Thread Sebastian Berg
On Do, 2015-08-13 at 14:36 -0400, Benjamin Root wrote: > Did you do a "git clean -fxd" before re-installing? > Yup. > > On Thu, Aug 13, 2015 at 2:34 PM, Sebastian Berg > wrote: > Hey, > > just for hacking/testing, I tried to add to shape.c: > > >

Re: [Numpy-discussion] Multiarray API size mismatch 301 302?

2015-08-13 Thread Benjamin Root
Did you do a "git clean -fxd" before re-installing? On Thu, Aug 13, 2015 at 2:34 PM, Sebastian Berg wrote: > Hey, > > just for hacking/testing, I tried to add to shape.c: > > > /*NUMPY_API > * > * Checks if memory overlap exists > */ > NPY_NO_EXPORT int > PyArray_ArraysShareMemory(PyArrayObje

[Numpy-discussion] Multiarray API size mismatch 301 302?

2015-08-13 Thread Sebastian Berg
Hey, just for hacking/testing, I tried to add to shape.c: /*NUMPY_API * * Checks if memory overlap exists */ NPY_NO_EXPORT int PyArray_ArraysShareMemory(PyArrayObject *arr1, PyArrayObject *arr2, int work) { return solve_may_share_memory(arr1, arr2, work); } and to numpy_api.py: #

Re: [Numpy-discussion] Development workflow (not git tutorial)

2015-08-13 Thread Stefan van der Walt
On 2015-08-13 08:52:22, Anne Archibald wrote: > My current approach is to build an empty virtualenv, pip install > nose, and from the numpy root directory do "python setup.py > build_ext --inplace" and "python -c 'import numpy; > numpy.test()'". This works, for my stock system python, though I

Re: [Numpy-discussion] Changes to np.digitize since NumPy 1.9?

2015-08-13 Thread Jaime Fernández del Río
On Thu, Aug 13, 2015 at 7:59 AM, Nathan Goldbaum wrote: > > > On Thu, Aug 13, 2015 at 9:44 AM, Charles R Harris < > charlesr.har...@gmail.com> wrote: > >> >> >> On Thu, Aug 13, 2015 at 12:09 AM, Jaime Fernández del Río < >> jaime.f...@gmail.com> wrote: >> >>> On Wed, Aug 12, 2015 at 2:03 PM, Nath

Re: [Numpy-discussion] Development workflow (not git tutorial)

2015-08-13 Thread Charles R Harris
On Thu, Aug 13, 2015 at 10:00 AM, Sebastian Berg wrote: > On Do, 2015-08-13 at 15:52 +, Anne Archibald wrote: > > Hi, > > > > > > What is a sensible way to work on (modify, compile, and test) numpy? > > > > > > There is documentation about "contributing to numpy" at: > > http://docs.scipy.org

Re: [Numpy-discussion] Development workflow (not git tutorial)

2015-08-13 Thread Sebastian Berg
On Do, 2015-08-13 at 15:52 +, Anne Archibald wrote: > Hi, > > > What is a sensible way to work on (modify, compile, and test) numpy? > > > There is documentation about "contributing to numpy" at: > http://docs.scipy.org/doc/numpy-dev/dev/index.html > > and: > http://docs.scipy.org/doc/num

[Numpy-discussion] Development workflow (not git tutorial)

2015-08-13 Thread Anne Archibald
Hi, What is a sensible way to work on (modify, compile, and test) numpy? There is documentation about "contributing to numpy" at: http://docs.scipy.org/doc/numpy-dev/dev/index.html and: http://docs.scipy.org/doc/numpy-dev/dev/gitwash/development_workflow.html but these are entirely focused on usi

Re: [Numpy-discussion] Changes to np.digitize since NumPy 1.9?

2015-08-13 Thread Nathan Goldbaum
On Thu, Aug 13, 2015 at 9:44 AM, Charles R Harris wrote: > > > On Thu, Aug 13, 2015 at 12:09 AM, Jaime Fernández del Río < > jaime.f...@gmail.com> wrote: > >> On Wed, Aug 12, 2015 at 2:03 PM, Nathan Goldbaum >> wrote: >> >>> Hi all, >>> >>> I've been testing the package I spend most of my time o

Re: [Numpy-discussion] Changes to np.digitize since NumPy 1.9?

2015-08-13 Thread Charles R Harris
On Thu, Aug 13, 2015 at 12:09 AM, Jaime Fernández del Río < jaime.f...@gmail.com> wrote: > On Wed, Aug 12, 2015 at 2:03 PM, Nathan Goldbaum > wrote: > >> Hi all, >> >> I've been testing the package I spend most of my time on, yt, under numpy >> 1.10b1 since the announcement went out. >> >> I thin

Re: [Numpy-discussion] [SciPy-Dev] ANN: Numpy 1.10.0b1 release

2015-08-13 Thread Matthew Brett
Hi, On Wed, Aug 12, 2015 at 12:23 PM, Sebastian Berg wrote: > On Mi, 2015-08-12 at 01:07 -0700, Nathaniel Smith wrote: >> On Wed, Aug 12, 2015 at 12:51 AM, Sebastian Berg >> wrote: >> > On Mi, 2015-08-12 at 09:41 +0200, Jens Jørgen Mortensen wrote: >> >> On 08/11/2015 11:23 PM, Charles R Harris

Re: [Numpy-discussion] Changes to np.digitize since NumPy 1.9?

2015-08-13 Thread Nathaniel Smith
On Aug 12, 2015 11:12 PM, "Jaime Fernández del Río" wrote: > > On Wed, Aug 12, 2015 at 2:03 PM, Nathan Goldbaum wrote: >> >> Hi all, >> >> I've been testing the package I spend most of my time on, yt, under numpy 1.10b1 since the announcement went out. >> >> I think I've narrowed down and fixed a