A Wednesday 22 December 2010 01:53:55 Mark Wiebe escrigué:
Hello NumPy-ers,
After some performance analysis, I've designed and implemented a new
iterator designed to speed up ufuncs and allow for easier
multi-dimensional iteration. The new code is fairly large, but
works quite well
This now makes sense to me, and I think it should work :D. This is all very
cool. This is going to do big things for cython and numpy.
Some hopefully constructive criticism:
When first reading through the API description, the way oa_ndim and oa_axes
work is not clear. I think your description
On Wed, Dec 22, 2010 at 12:21 AM, Francesc Alted fal...@pytables.orgwrote:
snip
Wow, really nice work! It would be great if that could make into NumPy
:-) Regarding your comment on numexpr being faster, I'm not sure (your
new_iterator branch does not work for me; it gives me an error like:
A Wednesday 22 December 2010 09:48:03 Mark Wiebe escrigué:
On Wed, Dec 22, 2010 at 12:21 AM, Francesc Alted
fal...@pytables.orgwrote:
snip
Wow, really nice work! It would be great if that could make into
NumPy
:-) Regarding your comment on numexpr being faster, I'm not sure
:(your
Hello,
Please somebody help me !
I am really confused with all these void that I see everywhere.
The documentation says:
PyObject * PyArray_SETITEM(PyObject * arr, void* itemptr, PyObject* obj)
I created a 1D array of doubles with PyArray_SimpleNew.
Now I am in a loop of index i to feed
A Wednesday 22 December 2010 10:55:30 Michel Dupront escrigué:
Hello,
Please somebody help me !
I am really confused with all these void that I see everywhere.
The documentation says:
PyObject * PyArray_SETITEM(PyObject * arr, void* itemptr, PyObject*
obj)
I created a 1D array of
Is the formatting of savetxt available with a string as the destination?
If not, shouldn't this functionality be factored out of savetxt?
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
On Wed, Dec 22, 2010 at 1:08 PM, Neal Becker ndbeck...@gmail.com wrote:
Is the formatting of savetxt available with a string as the destination?
If not, shouldn't this functionality be factored out of savetxt?
Have you tried using a StringIO handle?
Peter
Peter wrote:
On Wed, Dec 22, 2010 at 1:08 PM, Neal Becker ndbeck...@gmail.com wrote:
Is the formatting of savetxt available with a string as the destination?
If not, shouldn't this functionality be factored out of savetxt?
Have you tried using a StringIO handle?
Peter
Yup. But
What is the most efficient way to do the Matlab equivalent of nnz(M)
(nnz = number-of-non-zeros function)?
I've tried Google, but no luck.
My assumption is that something like
a != 0
will be used, but I'm not sure then how to count the number of True
entries.
TIA.
Ian
attachment:
On 12/22/2010 9:16 AM, Ian Stokes-Rees wrote:
a != 0
will be used, but I'm not sure then how to count the number of True
entries.
(a != 0).sum()
hth,
Alan Isaac
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
On Tue, Dec 21, 2010 at 10:05 PM, Charles R Harris
charlesr.har...@gmail.com wrote:
snip
Wow, that's a really nice design and write up. Small typo:
/* Only allow exactly equivalent types */
NPY_NO_CASTING=0,
/* Allow casts between equivalent types of different byte
On Wed, Dec 22, 2010 at 12:54 AM, Francesc Alted fal...@pytables.orgwrote:
A Wednesday 22 December 2010 09:48:03 Mark Wiebe escrigué:
On Wed, Dec 22, 2010 at 12:21 AM, Francesc Alted
fal...@pytables.orgwrote:
snip
new_iterator branch does not work for me; it gives me an error
like:
On Wed, Dec 22, 2010 at 12:44 AM, John Salvatier
jsalv...@u.washington.eduwrote:
This now makes sense to me, and I think it should work :D. This is all very
cool. This is going to do big things for cython and numpy.
Some hopefully constructive criticism:
When first reading through the API
A Wednesday 22 December 2010 17:25:13 Mark Wiebe escrigué:
Can you print out your np.__version__, and try running the tests? If
newiter didn't build for some reason, its tests should be throwing a
bunch of exceptions.
I'm a bit swamped now. Let's see if I can do that later on.
I see :-)
On Wed, Dec 22, 2010 at 9:07 AM, Francesc Alted fal...@pytables.org wrote:
A Wednesday 22 December 2010 17:25:13 Mark Wiebe escrigué:
Can you print out your np.__version__, and try running the tests? If
newiter didn't build for some reason, its tests should be throwing a
bunch of
On Wednesday, December 22, 2010 07:16:17 am Ian Stokes-Rees wrote:
What is the most efficient way to do the Matlab equivalent of nnz(M)
(nnz = number-of-non-zeros function)?
I've tried Google, but no luck.
My assumption is that something like
a != 0
will be used, but I'm not sure
A Wednesday 22 December 2010 18:21:28 Mark Wiebe escrigué:
On Wed, Dec 22, 2010 at 9:07 AM, Francesc Alted fal...@pytables.org
wrote:
A Wednesday 22 December 2010 17:25:13 Mark Wiebe escrigué:
Can you print out your np.__version__, and try running the tests?
If newiter didn't build for
On Wed, Dec 22, 2010 at 10:41 AM, Francesc Alted fal...@pytables.orgwrote:
NumPy version 2.0.0.dev-147f817
There's your problem, it looks like the PYTHONPATH isn't seeing your new
build for some reason. That build is off of this commit in the NumPy master
branch:
=
Announcing carray 0.3
=
What's new
==
A lot of stuff. The most outstanding feature in this version is the
introduction of a `ctable` object. A `ctable` is similar to a
structured array in NumPy, but instead of storing the data row-wise, it
uses
A Wednesday 22 December 2010 19:52:45 Mark Wiebe escrigué:
On Wed, Dec 22, 2010 at 10:41 AM, Francesc Alted
fal...@pytables.orgwrote:
NumPy version 2.0.0.dev-147f817
There's your problem, it looks like the PYTHONPATH isn't seeing your
new build for some reason. That build is off of this
On Wed, Dec 22, 2010 at 11:16 AM, Francesc Alted fal...@pytables.orgwrote:
A Wednesday 22 December 2010 19:52:45 Mark Wiebe escrigué:
On Wed, Dec 22, 2010 at 10:41 AM, Francesc Alted
fal...@pytables.orgwrote:
NumPy version 2.0.0.dev-147f817
There's your problem, it looks like the
A Wednesday 22 December 2010 20:42:54 Mark Wiebe escrigué:
On Wed, Dec 22, 2010 at 11:16 AM, Francesc Alted
fal...@pytables.orgwrote:
A Wednesday 22 December 2010 19:52:45 Mark Wiebe escrigué:
On Wed, Dec 22, 2010 at 10:41 AM, Francesc Alted
fal...@pytables.orgwrote:
NumPy version
To answer the part about the most efficient way to do that,
In [1]: a = array([0,1,4,76,3,0,4,67,9,5,3,9,0,5,23,3,0,5,3,3,0,5,0])
In [8]: %timeit len(where(a!=0)[0])
10 loops, best of 3: 6.54 us per loop
In [9]: %timeit (a!=0).sum()
10 loops, best of 3: 9.81 us per loop
Seems like the
On Wed, Dec 22, 2010 at 12:05 PM, Francesc Alted fal...@pytables.orgwrote:
snip
Ah, things go well now:
timeit 3*a+b-(a/c)
10 loops, best of 3: 67.7 ms per loop
timeit luf(lambda a,b,c:3*a+b-(a/c), a, b, c)
10 loops, best of 3: 27.8 ms per loop
timeit ne.evaluate(3*a+b-(a/c))
10
On Wed, Dec 22, 2010 at 12:42 PM, Mark Wiebe mwwi...@gmail.com wrote:
snip
I think numexpr could get a nice boost from using the new iterator
internally though
There's actually a trivial way to do this with very minimal changes to
numexpr - the 'itview' mechanism. Create the new iterator,
On 12/22/10 9:16 AM, Ian Stokes-Rees wrote:
What is the most efficient way to do the Matlab equivalent of nnz(M)
(nnz = number-of-non-zeros function)?
Thanks to all the various responses. I should have mentioned that I'm
using scipy.sparse, and lil_matrix objects have a method getnnz()
which
A Wednesday 22 December 2010 22:02:03 Mark Wiebe escrigué:
On Wed, Dec 22, 2010 at 12:42 PM, Mark Wiebe mwwi...@gmail.com
wrote: snip
I think numexpr could get a nice boost from using the new iterator
internally though
There's actually a trivial way to do this with very minimal changes
Like most people these days, I have multiple 24 monitors. I don't need
print of ndarrays to wrap after 72 columns. Is there some way to
change this?
TIA
Ian
CURRENT:
[NaN NaN NaN NaN NaN 5.1882094
1.19646584]]
DESIRED:
[NaN NaN
On Wed, Dec 22, 2010 at 16:32, Ian Stokes-Rees
ijsto...@hkl.hms.harvard.edu wrote:
Like most people these days, I have multiple 24 monitors. I don't need
print of ndarrays to wrap after 72 columns. Is there some way to
change this?
np.set_printoptions(linewidth=100)
--
Robert Kern
I have
30 matches
Mail list logo