,:] creates a view onto the same memory of the original array.
Since you modify the values in-place, a[0,0] gets set to
a[0,0]-a[0,0]==0, then a[1,0] gets set to a[1,0] - a[0,0] == a[1,0] -
0 == a[1,0], etc. Try this instead:
a -= a[0,:].copy()
--
Robert Kern
I have come to believe that the whole
of the crash?
--
Robert Kern
I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth.
-- Umberto Eco
___
NumPy-Discussion mailing
(gdb) prompt:
(gdb) continue # - Type this.
Python 2.6.2 ...
import numpy # - Type this and do whatever else is necessary to reproduce
the crash.
...
(gdb) bt # - Type this.
# - Copy-paste these results here.
--
Robert Kern
I have come to believe that the whole world is an enigma
(ones((1,1)), ones((1,1)))
This does not leak for me using SVN versions of numpy and scipy. I
recommend upgrading.
--
Robert Kern
I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying
really want:
u_row = my_func (u_row)
Iterate over indices instead:
for i in range(len(u)):
u[i] = my_func(u[i])
--
Robert Kern
I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had
]:
array([[ 0.6667, 1.],
[ 0.5 , 5.]])
--
Robert Kern
I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth.
-- Umberto Eco
A = np.array([1,2,3,4,5,6]), k = 2
b = [1,2]
c=[3,4,5,6]
b = A[:2]
c = A[2:]
--
Robert Kern
I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth.
-- Umberto Eco
--much better for this.
And numpy.clip() may be helpful here,
No, it's not.
though last I checked, it's
written in Python,
No, it isn't.
and thus not all that fast.
No, it's reasonably performant.
--
Robert Kern
I have come to believe that the whole world is an enigma, a harmless
enigma
import Timer
t = Timer(a[abs(a) 0.1] = 0, import
numpy;a=numpy.random.random((2000, 2000)))
t.repeat()
--
Robert Kern
I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth
On Wed, Mar 17, 2010 at 14:07, josef.p...@gmail.com wrote:
On Wed, Mar 17, 2010 at 3:01 PM, Robert Kern robert.k...@gmail.com wrote:
On Wed, Mar 17, 2010 at 14:04, Christopher Barker chris.bar...@noaa.gov
wrote:
Friedrich Romstedt wrote:
Code:
import numpy
import time
On Wed, Mar 17, 2010 at 14:18, Keith Goodman kwgood...@gmail.com wrote:
On Wed, Mar 17, 2010 at 12:08 PM, Robert Kern robert.k...@gmail.com wrote:
On Wed, Mar 17, 2010 at 14:03, Keith Goodman kwgood...@gmail.com wrote:
On Wed, Mar 17, 2010 at 12:04 PM, Christopher Barker
chris.bar...@noaa.gov
using a C long would
work best for you. It's platform dependent, but it matches the
platform dependent changes in numpy. It depends on what your needs
are. If you need a consistent size (perhaps you are writing bytes out
to a file), then always use the int32 or int64 specific types.
--
Robert Kern
be easy. Little help?
That character is used to specify the byte order. | means native
byte order. For 'S' dtypes, it doesn't make a difference; it has no
byte order.
--
Robert Kern
I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad
, because StringIO is in io in python 3, and we
have a io module in numpy (.io is the new syntax for relative import).
Ignore my previous email. This is the correct answer.
--
Robert Kern
I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad
On Wed, Mar 24, 2010 at 09:35, Nadav Horesh nad...@visionsense.com wrote:
Any idea why
from .io import StringIO
and not
from io import StringIO
???
(Why is the extra . before io)
It is a relative import, i.e. numpy.lib.io .
--
Robert Kern
I have come to believe that the whole
, because StringIO is in io in python 3, and we
have a io module in numpy (.io is the new syntax for relative import).
Bug reported:
http://bugs.python.org/issue8221
--
Robert Kern
I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad
On Wed, Mar 24, 2010 at 10:20, Charles R Harris
charlesr.har...@gmail.com wrote:
On Wed, Mar 24, 2010 at 9:07 AM, Robert Kern robert.k...@gmail.com wrote:
On Wed, Mar 24, 2010 at 09:43, David Cournapeau courn...@gmail.com
wrote:
On Wed, Mar 24, 2010 at 11:35 PM, Nadav Horesh nad
. It has no effect on floating point
types; 32- and 64-bit versions are standard on all supported platforms
though the higher precisions vary significantly from machine to
machine regardless of whether it is 32- or 64-bit.
--
Robert Kern
I have come to believe that the whole world is an enigma
context: http://bugs.python.org/issue7261
I'd put that in the would be nice, but not a priority category.
--
Robert Kern
I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth
-March/049551.html
etc.
Is it to take effect with the incoming numpy 2.0 release ?
Yes.
--
Robert Kern
I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth.
-- Umberto
of Rbf could be made to
handle the vector-valued case. I leave that as an exercise to Andrea,
of course. :-)
--
Robert Kern
I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth
them properly to avoid RBFs
going crazy.
Scaling each axis by its standard deviation is a typical first start.
Shifting and scaling the values such that they each go from 0 to 1 is
another useful thing to try.
--
Robert Kern
I have come to believe that the whole world is an enigma, a harmless
On Mon, Mar 29, 2010 at 16:00, Pascal pascal...@parois.net wrote:
Hi,
Does anyone have an idea how fft functions are implemented? Is it pure
python? based on BLAS/LAPACK? or is it using fftw?
Using FFTPACK converted from FORTRAN to C.
--
Robert Kern
I have come to believe that the whole
has some GP code:
http://pymc.googlecode.com/files/GPUserGuide.pdf
--
Robert Kern
I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth.
-- Umberto Eco
subsystems. The list indexing takes priority so the list-indexed axes
end up first in the result. The sliced axes follow them.
--
Robert Kern
I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had
should be faster than a boolean
op.
Branch prediction failures are really costly in modern CPUs.
http://en.wikipedia.org/wiki/Branch_prediction
--
Robert Kern
I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret
the capitalization). This is almost always
PyMem_Free() from Python.
--
Robert Kern
I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth.
-- Umberto Eco
( irrespective to what is inside array).
a.size 0
--
Robert Kern
I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth.
-- Umberto Eco
the array. b[0] is the array itself.
--
Robert Kern
I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth.
-- Umberto Eco
___
NumPy
, 7, 6],
[1, 2, 3, 4, 5]])
In [3]: cond = (x 5)
In [4]: i, j = where(cond)
In [5]: i
Out[5]: array([1, 1, 1, 1, 1])
In [6]: j
Out[6]: array([0, 1, 2, 3, 4])
In [7]: argmax(x[cond])
Out[7]: 2
In [8]: i[2], j[2]
Out[8]: (1, 2)
In [9]: x[i[2], j[2]]
Out[9]: 8
--
Robert Kern
I have
() to get the
dependencies.
--
Robert Kern
I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth.
-- Umberto Eco
___
NumPy-Discussion
instances don't pickle. Don't pass them as arguments to
apply_async() or related functions. Instead, pass the filename and
other arguments to memmap() and reconstruct the arrays in each
process.
--
Robert Kern
I have come to believe that the whole world is an enigma, a harmless
enigma that is made
, and then reconstruct an ndarray on
the other side and just change the type to memmap without actually
memory-mapping the file. Thus you have a __del__ method referring to
attributes that haven't been set up.
--
Robert Kern
I have come to believe that the whole world is an enigma, a harmless
enigma
shared memory array instead. I wonder, since both types share common
properties, if there a way to interchange then transparently.
Yes, you just need to instantiate the memmap arrays separately in each process.
--
Robert Kern
I have come to believe that the whole world is an enigma
directory in
numpy/core/src?
David already did this: numpy/core/src/npymath/
--
Robert Kern
I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth.
-- Umberto Eco
On Mon, Apr 5, 2010 at 10:56, Charles R Harris
charlesr.har...@gmail.com wrote:
On Mon, Apr 5, 2010 at 9:43 AM, Robert Kern robert.k...@gmail.com wrote:
On Mon, Apr 5, 2010 at 10:40, Charles R Harris
charlesr.har...@gmail.com wrote:
Hi All,
David Cournapeau has mentioned that he would
provide both the
start and end points (rather than being fence-posts like reduceat).
Is the `reducein` important to have, as compared to `reduceat`?
Yes, I think so. If there are some areas you want to ignore, that's
difficult to do with reduceat().
--
Robert Kern
I have come to believe
On Mon, Apr 12, 2010 at 04:03, Nadav Horesh nad...@visionsense.com wrote:
Is there a way to get the file-name given a memmap array object?
Not at this time. This would be very useful, though, so patches are welcome.
--
Robert Kern
I have come to believe that the whole world is an enigma
this be (a) the cheapest way (w.r.t. memory) to store Booleans and
Yes.
(b)
the most efficient way to compare two lists of Booleans?
Yes.
--
Robert Kern
I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret
On Mon, Apr 12, 2010 at 15:52, Charles R Harris
charlesr.har...@gmail.com wrote:
On Mon, Apr 12, 2010 at 2:37 PM, Charles R Harris
charlesr.har...@gmail.com wrote:
On Mon, Apr 12, 2010 at 1:55 PM, Brent Pedersen bpede...@gmail.com
wrote:
On Mon, Apr 12, 2010 at 9:49 AM, Robert Kern
the .name attribute of a file object to be a
file name, the .name attribute an another type of object may be
something different. memmap objects are quite different from file
objects; we gain no particular consistency by using .name instead of
.filename.
--
Robert Kern
I have come to believe
On Mon, Apr 12, 2010 at 16:14, Brent Pedersen bpede...@gmail.com wrote:
On Mon, Apr 12, 2010 at 1:59 PM, Robert Kern robert.k...@gmail.com wrote:
On Mon, Apr 12, 2010 at 15:52, Charles R Harris
charlesr.har...@gmail.com wrote:
On Mon, Apr 12, 2010 at 2:37 PM, Charles R Harris
charlesr.har
On Mon, Apr 12, 2010 at 16:43, Gael Varoquaux
gael.varoqu...@normalesup.org wrote:
On Mon, Apr 12, 2010 at 04:39:23PM -0500, Robert Kern wrote:
where should i write the docs? in the file itself or through the doc
editor? also re path, since it can be a file-like, that would have
On Mon, Apr 12, 2010 at 17:00, Brent Pedersen bpede...@gmail.com wrote:
On Mon, Apr 12, 2010 at 2:46 PM, Robert Kern robert.k...@gmail.com wrote:
On Mon, Apr 12, 2010 at 16:43, Gael Varoquaux
gael.varoqu...@normalesup.org wrote:
On Mon, Apr 12, 2010 at 04:39:23PM -0500, Robert Kern wrote
replace 2 with 3 and have no 2s in the by array):
add.reduceby(array=[1,2,3,4,5,6,7,8,9], by=[0,1,0,1,3,0,0,3,3]) ==
[17, 6, 0, 22]
This basically generalizes bincount() to other binary ufuncs.
--
Robert Kern
I have come to believe that the whole world is an enigma, a harmless
enigma
to the scipy cookbook, but scipy.org is not
responding.]
I've bounced the server. Try again.
--
Robert Kern
I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth.
-- Umberto Eco
On Sat, Apr 10, 2010 at 17:59, Robert Kern robert.k...@gmail.com wrote:
On Sat, Apr 10, 2010 at 12:45, Pauli Virtanen p...@iki.fi wrote:
la, 2010-04-10 kello 12:23 -0500, Travis Oliphant kirjoitti:
[clip]
Here are my suggested additions to NumPy:
ufunc methods:
[clip]
* reducein
no way to get around that, I am afraid.
It
might be doable with a bit of ctypes if there is not a native numpy call.
import numpy as np
a = np.array((1,2,3,4))
b = np.array((11,12,13,14))
c = np.magical_fuse(a, b) # what goes here?
c = np.vstack([a, b])
--
Robert Kern
I have come
(16):
for iy in range (16):
const[ix, iy] = u[ix] + 1j*u[iy]
In [7]: real, imag = np.mgrid[-7.5:7.5:16j, -7.5:7.5:16j]
In [8]: const = real + 1j * imag
--
Robert Kern
I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad
/carv/d1/people/pradeep/src/numpy-1.3.0/numpy',
You should not have these two entries in your sys.path. Did you add
them yourself via PYTHONPATH? If so, remove them.
--
Robert Kern
I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad
it.
--
Robert Kern
I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth.
-- Umberto Eco
___
NumPy-Discussion mailing list
NumPy
-1.3.0/.
--
Robert Kern
I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth.
-- Umberto Eco
___
NumPy-Discussion mailing list
NumPy
/'
or the equivalent if you decide to fix the --prefix as above.
--
Robert Kern
I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth.
-- Umberto Eco
probably replace the line in setup.py.in (sorry if this is
not exactly right; I only downloaded the 1.7.0 sources, which still
uses numarray):
numpy_incl = @NUMPY_INC_DIR@
to:
import numpy
numpy_incl = numpy.get_include()
Then the value of NUMPY_INC_DIR will not matter.
--
Robert Kern
I
installed to.
--
Robert Kern
I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth.
-- Umberto Eco
___
NumPy-Discussion mailing
in PYTHONPATH -- if you install everything you
need, you won't need to. When I'm using something under development, I
use setuptools' setup.py develop
He does not have root.
--
Robert Kern
I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our
, justl like trim_zeros() does for 1D
arrays.
--
Robert Kern
I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth.
-- Umberto Eco
On Wed, Apr 21, 2010 at 10:34, Bruce Southey bsout...@gmail.com wrote:
On 04/21/2010 08:36 AM, Robert Kern wrote:
On Tue, Apr 20, 2010 at 18:45, Charles R Harris
charlesr.har...@gmail.com wrote:
On Tue, Apr 20, 2010 at 7:03 AM, Andreas Hilbollli...@hilboll.de wrote:
Hi
([('delimiter', '|V8'), ('slice', np.float32, (N, M))])
--
Robert Kern
I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth.
-- Umberto Eco
will behave as a regular
3D array.
However, that will make a main-memory copy of everything, presumably
what he is trying to avoid.
--
Robert Kern
I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had
On Thu, Apr 22, 2010 at 16:23, Bruce Southey bsout...@gmail.com wrote:
On 04/21/2010 02:45 PM, Robert Kern wrote:
On Wed, Apr 21, 2010 at 10:34, Bruce Southeybsout...@gmail.com wrote:
If the sum of axis to be removed equals zero then you can conditionally
remove that axis.
No. Negative
On Sun, Apr 25, 2010 at 16:17, Robert Kern robert.k...@gmail.com wrote:
On Thu, Apr 22, 2010 at 16:23, Bruce Southey bsout...@gmail.com wrote:
On 04/21/2010 02:45 PM, Robert Kern wrote:
On Wed, Apr 21, 2010 at 10:34, Bruce Southeybsout...@gmail.com wrote:
If the sum of axis to be removed
operators would be a huge incentive to the
NumPy community to move to Python 3.
Anybody willing to lead the charge with the Python developers?
There is currently a moratorium on language changes. This will have to wait.
--
Robert Kern
I have come to believe that the whole world is an enigma
On Wed, Apr 28, 2010 at 15:50, Travis Oliphant oliph...@enthought.com wrote:
On Apr 28, 2010, at 11:19 AM, Robert Kern wrote:
On Wed, Apr 28, 2010 at 11:05, Travis Oliphant
oliph...@enthought.com wrote:
On Apr 26, 2010, at 7:19 PM, David Warde-Farley wrote:
Trying to debug code written
. Currently I have a little C extension which
does the job, but I'm lazy to fix it up for all the various dtypes etc.
Am I missing a more general way?
total = np.bincount(indices, values)
--
Robert Kern
I have come to believe that the whole world is an enigma, a harmless
enigma that is made
greater
than `stop`.
You probably want linspace() instead.
--
Robert Kern
I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth.
-- Umberto Eco
,
comparison must necessarily be by exact equality because fuzzy
equality is not transitive.
--
Robert Kern
I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth.
-- Umberto Eco
On Wed, May 12, 2010 at 21:37, josef.p...@gmail.com wrote:
On Wed, May 12, 2010 at 9:27 PM, Robert Kern robert.k...@gmail.com wrote:
On Wed, May 12, 2010 at 20:09, Dr. Phillip M. Feldman
pfeld...@verizon.net wrote:
Warren Weckesser-3 wrote:
A couple questions:
How many floats will you
)
8
array([[0],
[0],
[0],
[0]])
|9 argsort(x,axis=0)
9
array([[0],
[2],
[1],
[3]])
Sorry, but I don't think we are going to add a special case for this.
--
Robert Kern
I have come to believe that the whole world is an enigma
On Fri, May 14, 2010 at 17:29, Eric Firing efir...@hawaii.edu wrote:
On 05/14/2010 11:03 AM, Dr. Phillip M. Feldman wrote:
Robert Kern-2 wrote:
On Wed, May 12, 2010 at 20:19, Dr. Phillip M. Feldman
pfeld...@verizon.net wrote:
When operating on an array whose last dimension is unity
that numpy.array() can do.
--
Robert Kern
I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth.
-- Umberto Eco
___
NumPy
a Simplifed BSD license, if that matters.
That should work just fine.
--
Robert Kern
I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth.
-- Umberto Eco
intermediate sums such that you are usually adding together numbers
roughly in the same regime as each other, so you don't lose as much
precision.
Use a.sum(dtype=np.float64) to use a float64 accumulator.
--
Robert Kern
I have come to believe that the whole world is an enigma, a harmless
enigma
.
--
Robert Kern
I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth.
-- Umberto Eco
___
NumPy-Discussion mailing list
NumPy
or not string. Maybe this is as good as it gets.
The dtypes have a hierarchy.
In [2]: np.issubdtype(float, np.number)
Out[2]: True
In [3]: np.issubdtype(str, np.number)
Out[3]: False
--
Robert Kern
I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible
On Sat, May 29, 2010 at 12:27, Keith Goodman kwgood...@gmail.com wrote:
Will making changes to arr2 never change arr1 if
arr2 = arr1[np.ix_(*lists)]
where lists is a list of (index) lists? np.ix_ returns a tuple of
arrays so I'm guessing (and hoping) the answer is yes.
Correct.
--
Robert
(10)
np.random.shuffle(l[:-1])
l
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
This behavior does match the doc-string. l[:-1] creates a new list
unconnected to the original list. np.random.shuffle() then shuffles
that new list in-place.
Is there any way for numpy to catch this?
Nope.
--
Robert Kern
I
(or record) arrays.
In general usage, that is true. However, we have more or less settled
on consistently using structured array in the documentation in order
to avoid confusion with recarrays.
--
Robert Kern
I have come to believe that the whole world is an enigma, a harmless
enigma that is made
lying around. Is there?
numpy.bincount()
--
Robert Kern
I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth.
-- Umberto Eco
=[('a', '|S6'), ('b', 'i4'), ('c', 'f8')])
In [5]: x.astype(np.dtype([('a', object), ('b', object), ('c', object)]))
Out[5]:
rec.array([('string', 10, 15.5)],
dtype=[('a', '|O4'), ('b', '|O4'), ('c', '|O4')])
--
Robert Kern
I have come to believe that the whole world is an enigma, a harmless
the .tolist() method.
--
Robert Kern
I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth.
-- Umberto Eco
___
NumPy-Discussion mailing
.
--
Robert Kern
I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth.
-- Umberto Eco
___
NumPy-Discussion mailing list
NumPy
of arrays out to a .zip file.
Each key/value pair will map to a file in the .zip file with a file
name corresponding to the key.
--
Robert Kern
I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had
On Mon, Jun 14, 2010 at 19:27, Warren Weckesser
warren.weckes...@enthought.com wrote:
Robert Kern wrote:
On Mon, Jun 14, 2010 at 19:00, Vishal Rana ranavis...@gmail.com wrote:
Hi,
I have dictionary of numpy record arrays, what could be fastest way to
save/load to/from a disk. I tried
and not all
the data is loaded to the memory?
Correct. The data is loaded lazily, on request.
--
Robert Kern
I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth.
-- Umberto Eco
Python extension are lost.
--
Robert Kern
I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth.
-- Umberto Eco
___
NumPy-Discussion
On Wed, Jun 16, 2010 at 12:15, Vishal Rana ranavis...@gmail.com wrote:
Hi,
I have a list of np arrays from which I create a np record array, but they
all of of different length!
How can I trim them all in place (for example I want to get last 10 elements
of each)?
x = x[-10:]
--
Robert
On Wed, Jun 16, 2010 at 12:30, Vishal Rana ranavis...@gmail.com wrote:
Robert,
Do I have to repeat it for each element in the list or is there a way I can
iterate the list and do it?
new_list = [x[-10:] for x in old_list]
--
Robert Kern
I have come to believe that the whole world
and is not ideal. But IIRC, no one has yet
put in the effort to implement ways to do both things.
--
Robert Kern
I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth.
-- Umberto Eco
returned 1 exit status
This means that your ATLAS library was compiled without the
appropriate flags for inclusion in a shared library like an extension
module. Consult the ATLAS installation instructions for how to compile
it as relocatable code using the -fPIC flag.
--
Robert Kern
I have come
On Thu, Jun 17, 2010 at 09:29, greg whittier gre...@gmail.com wrote:
I have files (from an external source) that contain ~10 GB of
big-endian uint16's that I need to read into a series of arrays.
np.fromfile(filename, dtype='i2')
--
Robert Kern
I have come to believe that the whole world
have an unpack_farray version like xdrlib
does. I also thought of using the array module and .byteswap() but
the help says it only work on 4 and 8 byte arrays.
Maybe is a problem with docs.
I think he was talking about the standard library array module.
--
Robert Kern
I have come to believe
package with a trivial setup.py.
Try it both with from distutils.core import setup and from
numpy.distutils.core import setup. See where they each install to.
Both work identically for me.
--
Robert Kern
I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible
?
It does come with the tradeoff that math will be a little bit slower
on it. A quick .astype(np.uint16) will fix that. That said, the cost
of creating the memory for the new native array will probably wipe
away those gains unless if the data is reused a number of times for
calculations.
--
Robert
to int also.
It is referring to the Python int type, not the C int type. Python
ints are actually C longs underneath.
--
Robert Kern
I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had
--
Robert Kern
I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth.
-- Umberto Eco
___
NumPy-Discussion mailing list
NumPy
be useful.
I have often wanted one.
--
Robert Kern
I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth.
-- Umberto Eco
___
NumPy
).
--
Robert Kern
I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth.
-- Umberto Eco
___
NumPy-Discussion mailing list
NumPy
of
records. 1-D vectors are primarily treated as row vectors by things
that care about horizontal and vertical for all dtypes, both
records and normal scalars. It just gets a bit confusing because one
often thinks of 1-D arrays of records as being rows and columns.
--
Robert Kern
I have come
=0,879)
C = A[b, np.arange(880)]
--
Robert Kern
I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth.
-- Umberto Eco
___
NumPy
1101 - 1200 of 2461 matches
Mail list logo