On Tue, Jun 21, 2011 at 3:55 AM, Bruce Southey bsout...@gmail.com wrote:
On Mon, Jun 20, 2011 at 2:43 PM, Ralf Gommers
ralf.gomm...@googlemail.com wrote:
On Mon, Jun 20, 2011 at 8:50 PM, Bruce Southey bsout...@gmail.com
wrote:
I copied the files but that just moves the problem. So
The following call is a bottleneck for me:
np.in1d( large_array.field_of_interest, values_of_interest )
I'm not sure how in1d() is implemented, but this call seems to be slower than
O(n) and faster than O( n**2 ), so perhaps it sorts the values_of_interest and
does a binary search for each
Hi,
On my system (Intel Xeon, Windows 7 64-bit), ndarray.tofile() outputs
in little-endian. This is a bit inconvenient, since everything else I
do is in big-endian. Unfortunately, scipy.io.write_arrray() is
deprecated, and I can't find any other routines that write pure raw
binary. Are there any
Did you try searchsorted?
Nadav
מאת: numpy-discussion-boun...@scipy.org
[mailto:numpy-discussion-boun...@scipy.org] בשם Michael Katz
נשלח: Tuesday, June 21, 2011 10:06
אל: Discussion of Numerical Python
נושא: [Numpy-discussion] faster in1d() for monotonic
Hi Ben,
based on this example
https://bitbucket.org/lannybroo/numpyio/src/a6191c989804/numpyIO.py
I suspect the way to do it is with numpy.byteswap() and numpy.tofile()
From
http://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.byteswap.html
we can do
A = np.array([1, 256, 8755],
Thanks Gary, that works. Out of interest I timed it:
http://pastebin.com/HA4Qn9Ge
On average the swapping incurred a 0.04 second penalty (compared with
1.5 second total run time) for a 4096x4096 array of 64-bit reals. So
there is no real penalty.
Cheers,
Ben
On Tue, Jun 21, 2011 at 8:37 PM,
On 06/21/2011 01:01 AM, Ralf Gommers wrote:
On Tue, Jun 21, 2011 at 3:55 AM, Bruce Southey bsout...@gmail.com
mailto:bsout...@gmail.com wrote:
On Mon, Jun 20, 2011 at 2:43 PM, Ralf Gommers
ralf.gomm...@googlemail.com mailto:ralf.gomm...@googlemail.com
wrote:
On
I'm not quite sure how to use searchsorted to get the output I need (e.g., the
length of the output needs to be as long as large_array). But in any case it
says it uses binary search, so it would seem to be an O( n * log( n ) )
solution, whereas I'm hoping for an O( n ) solution.
Hello all,
As a result of the fast greyscale conversion thread, I noticed an anomaly
with numpy.ndararray.sum(): summing along certain axes is much slower with
sum() than versus doing it explicitly, but only with integer dtypes and when
the size of the dtype is less than the machine word. I
On Tue, Jun 21, 2011 at 10:46 AM, Zachary Pincus zachary.pin...@yale.eduwrote:
Hello all,
As a result of the fast greyscale conversion thread, I noticed an anomaly
with numpy.ndararray.sum(): summing along certain axes is much slower with
sum() than versus doing it explicitly, but only with
On Tue, Jun 21, 2011 at 9:46 AM, Zachary Pincus zachary.pin...@yale.edu wrote:
Hello all,
As a result of the fast greyscale conversion thread, I noticed an anomaly
with numpy.ndararray.sum(): summing along certain axes is much slower with
sum() than versus doing it explicitly, but only with
On Tue, Jun 21, 2011 at 11:17 AM, Keith Goodman kwgood...@gmail.com wrote:
On Tue, Jun 21, 2011 at 9:46 AM, Zachary Pincus zachary.pin...@yale.edu
wrote:
Hello all,
As a result of the fast greyscale conversion thread, I noticed an
anomaly with numpy.ndararray.sum(): summing along certain
On Mon, Jun 20, 2011 at 12:32 PM, Mark Wiebe mwwi...@gmail.com wrote:
NumPy has a mechanism built in to allow subclasses to adjust or override
aspects of the ufunc behavior. While this goal is important, this mechanism
only allows for very limited customization, making for instance the masked
On Jun 21, 2011, at 1:16 PM, Charles R Harris wrote:
It's because of the type conversion sum uses by default for greater precision.
Aah, makes sense. Thanks for the detailed explanations and timings!
___
NumPy-Discussion mailing list
Neal Becker wrote:
I'm wondering what are good choices for fast numpy array serialization?
mmap: fast, but I guess not self-describing?
hdf5: ?
pickle: self-describing, but maybe not fast?
others?
I think, in addition, that hdf5 is the only one that easily interoperates with
matlab?
On Tue, Jun 21, 2011 at 12:49, Neal Becker ndbeck...@gmail.com wrote:
I'm wondering what are good choices for fast numpy array serialization?
mmap: fast, but I guess not self-describing?
hdf5: ?
pickle: self-describing, but maybe not fast?
others?
NPY:
Neal Becker wrote:
I'm wondering what are good choices for fast numpy array serialization?
mmap: fast, but I guess not self-describing?
hdf5: ?
Should be pretty fast, and self describing -- advantage of being a
standard. Disadvantage is that it requires an hdf5 library, which can b
a pain
On Tue, Jun 21, 2011 at 12:36 PM, Charles R Harris
charlesr.har...@gmail.com wrote:
On Mon, Jun 20, 2011 at 12:32 PM, Mark Wiebe mwwi...@gmail.com wrote:
NumPy has a mechanism built in to allow subclasses to adjust or override
aspects of the ufunc behavior. While this goal is important,
I am a huge fan of rec2csv and csv2rec, which might not technically be part of
numpy, and can be found in pylab or the matplotlib.mlab module.
--Abie
From: numpy-discussion-boun...@scipy.org
[mailto:numpy-discussion-boun...@scipy.org] On Behalf Of Olivier Delalleau
Sent: Wednesday, June 15,
Neal Becker wrote:
I'm wondering what are good choices for fast numpy array serialization?
mmap: fast, but I guess not self-describing?
hdf5: ?
pickle: self-describing, but maybe not fast?
others?
I think, in addition, that hdf5 is the only one that easily interoperates
with
matlab?
On 21.06.2011, at 7:58PM, Neal Becker wrote:
I think, in addition, that hdf5 is the only one that easily interoperates
with
matlab?
speaking of hdf5, I see:
pyhdf5io 0.7 - Python module containing high-level hdf5 load and save
functions.
h5py 2.0.0 - Read and write HDF5 files from
On Tue, Jun 21, 2011 at 11:57 AM, Mark Wiebe mwwi...@gmail.com wrote:
On Tue, Jun 21, 2011 at 12:36 PM, Charles R Harris
charlesr.har...@gmail.com wrote:
On Mon, Jun 20, 2011 at 12:32 PM, Mark Wiebe mwwi...@gmail.com wrote:
NumPy has a mechanism built in to allow subclasses to adjust or
Hi,
I have been using h5py a lot (both on windows and Mac OSX) and can only
recommend it- haven't tried the other options though
Cheers,
Simon
On Tue, Jun 21, 2011 at 8:24 PM, Derek Homeier
de...@astro.physik.uni-goettingen.de wrote:
On 21.06.2011, at 7:58PM, Neal Becker wrote:
I
Robert Kern wrote:
https://raw.github.com/numpy/numpy/master/doc/neps/npy-format.txt
Just a note. From that doc:
HDF5 is a complicated format that more or less implements
a hierarchical filesystem-in-a-file. This fact makes satisfying
some of the Requirements difficult. To the
On Tue, Jun 21, 2011 at 2:28 PM, Charles R Harris
charlesr.har...@gmail.com wrote:
On Tue, Jun 21, 2011 at 11:57 AM, Mark Wiebe mwwi...@gmail.com wrote:
On Tue, Jun 21, 2011 at 12:36 PM, Charles R Harris
charlesr.har...@gmail.com wrote:
On Mon, Jun 20, 2011 at 12:32 PM, Mark Wiebe
On Tue, Jun 21, 2011 at 12:46 PM, Darren Dale dsdal...@gmail.com wrote:
On Tue, Jun 21, 2011 at 2:28 PM, Charles R Harris
charlesr.har...@gmail.com wrote:
On Tue, Jun 21, 2011 at 11:57 AM, Mark Wiebe mwwi...@gmail.com wrote:
On Tue, Jun 21, 2011 at 12:36 PM, Charles R Harris
Hi All,
is there a fast way to do cumsum with numexpr ? I could not find it,
but the functions available in numexpr does not seem to be
exhaustively documented, so it is possible that I missed it. Do not
know if 'sum' takes special arguments that can be used.
To try another track, does numexpr
Apologies, intended to send this to the scipy list.
On Tue, Jun 21, 2011 at 2:35 PM, srean srean.l...@gmail.com wrote:
Hi All,
is there a fast way to do cumsum with numexpr ? I could not find it,
but the functions available in numexpr does not seem to be
exhaustively documented, so it is
On Tue, Jun 21, 2011 at 4:38 PM, Bruce Southey bsout...@gmail.com wrote:
**
On 06/21/2011 01:01 AM, Ralf Gommers wrote:
On Tue, Jun 21, 2011 at 3:55 AM, Bruce Southey bsout...@gmail.com wrote:
On Mon, Jun 20, 2011 at 2:43 PM, Ralf Gommers
ralf.gomm...@googlemail.com wrote:
On Mon,
On Tue, Jun 21, 2011 at 10:05 PM, Ralf Gommers
ralf.gomm...@googlemail.comwrote:
On Tue, Jun 21, 2011 at 4:38 PM, Bruce Southey bsout...@gmail.com wrote:
**
On 06/21/2011 01:01 AM, Ralf Gommers wrote:
On Tue, Jun 21, 2011 at 3:55 AM, Bruce Southey bsout...@gmail.comwrote:
So what is
On Tue, Jun 21, 2011 at 1:28 PM, Charles R Harris charlesr.har...@gmail.com
wrote:
On Tue, Jun 21, 2011 at 11:57 AM, Mark Wiebe mwwi...@gmail.com wrote:
On Tue, Jun 21, 2011 at 12:36 PM, Charles R Harris
charlesr.har...@gmail.com wrote:
On Mon, Jun 20, 2011 at 12:32 PM, Mark Wiebe
On Tue, Jun 21, 2011 at 1:46 PM, Darren Dale dsdal...@gmail.com wrote:
On Tue, Jun 21, 2011 at 2:28 PM, Charles R Harris
charlesr.har...@gmail.com wrote:
On Tue, Jun 21, 2011 at 11:57 AM, Mark Wiebe mwwi...@gmail.com wrote:
On Tue, Jun 21, 2011 at 12:36 PM, Charles R Harris
Is there a fast way to compute an array of sum-of-squared-differences
between a (small) K x K array and all K x K sub-arrays of a larger array?
(i.e. each element x,y in the output array is the SSD between the small
array and the sub-array (x:x+K, y:y+K)
My current implementation loops over each
On Tue, Jun 21, 2011 at 5:09 PM, Alex Flint alex.fl...@gmail.com wrote:
Is there a fast way to compute an array of sum-of-squared-differences
between a (small) K x K array and all K x K sub-arrays of a larger array?
(i.e. each element x,y in the output array is the SSD between the small
array
On Tue, Jun 21, 2011 at 7:09 PM, Alex Flint alex.fl...@gmail.com wrote:
Is there a fast way to compute an array of sum-of-squared-differences
between a (small) K x K array and all K x K sub-arrays of a larger array?
(i.e. each element x,y in the output array is the SSD between the small
On Tue, Jun 21, 2011 at 3:52 PM, Ralf Gommers
ralf.gomm...@googlemail.com wrote:
On Tue, Jun 21, 2011 at 10:05 PM, Ralf Gommers ralf.gomm...@googlemail.com
wrote:
On Tue, Jun 21, 2011 at 4:38 PM, Bruce Southey bsout...@gmail.com wrote:
On 06/21/2011 01:01 AM, Ralf Gommers wrote:
On Tue,
36 matches
Mail list logo