In such a situation you should probably use a dictionary from the start,
i.e.:
d3['index'] = np.arange(100)
then use d3['index'] everywhere instead of index.
It can be more convenient (notation-wise) to use an object instead, i.e.
either work within a class method (self.index =
Just one thing: numpy.interp says it doesn't check that the x coordinates
are increasing, so make sure it's the case.
Assuming this is ok, I could still see how you may get some non-smooth
behavior: this may be because your spike can either be split between two
bins (which dilutes it somehow), or
Also: it seems like you are using values at the boundaries of the bins,
while I think it would make more sense to compute interpolated values at
the middle point of a bin. I'm not sure it'll make a big difference
visually, but it may be more appropriate.
-=- Olivier
2011/11/13 Olivier Delalleau
the
closest bins (t_k and t_{k+1} such that t_k t t_{k+1}), so that data
stored in many of the bins will not be used at all.
I haven't looked closely at the suggestion from Robert but it may be a
better way to achieve what you want.
-=- Olivier
2011/11/13 Olivier Delalleau sh...@keba.be
Also
2011/11/13 Robert Kern robert.k...@gmail.com
On Sun, Nov 13, 2011 at 17:48, Olivier Delalleau sh...@keba.be wrote:
Also: it seems like you are using values at the boundaries of the bins,
while I think it would make more sense to compute interpolated values at
the
middle point of a bin
In Python you use setattr to set an object's attribute whose name is stored
into a variable:
setattr(file2, att, file1.getncatt(att))
-=- Olivier
2011/11/14 Giovanni Plantageneto g.plantagen...@gmail.com
Hi everybody,
I am using netCDF4 library to read and write from netcdf files. I
would
2011/11/14 Robert Kern robert.k...@gmail.com
On Mon, Nov 14, 2011 at 20:18, MACKEITH Andrew andrew.macke...@3ds.com
wrote:
Could someone explain this?
An instance of numpy.int32 is not an instance of int or numpy.int.
An instance of numpy.int64 is an instance of int and numpy.int.
I
2011/11/15 MACKEITH Andrew andrew.macke...@3ds.com
*From:* numpy-discussion-boun...@scipy.org [mailto:
numpy-discussion-boun...@scipy.org] *On Behalf Of *Olivier Delalleau
*Sent:* Tuesday, November 15, 2011 7:03 AM
*To:* Discussion of Numerical Python
*Subject:* Re: [Numpy-discussion
If your new array is x, you can use:
numpy.ma.masked_array(x, mask=mask.mask)
-=- Olivier
2011/11/21 questions anon questions.a...@gmail.com
I am trying to mask one array using another array.
I have created a masked array using
mask=MA.masked_equal(myarray,
0),
that looks something like:
']._FillValue
TSFC=MA.masked_values(TSFC, fillvalue)
ncfile.close()
TSFC=MA.masked_array(TSFC,
mask=newmask.mask)
On Tue, Nov 22, 2011 at 11:21 AM, Olivier Delalleau sh...@keba.be
I attached a site.cfg file for numpy 1.3 compiled with MKL on some Linux 64
bit architecture, in case it might help.
I always had trouble getting programs (other than numpy though) to link and
execute properly with MKL.
You might also try to play with LD_PRELOAD.
Good luck,
-=- Olivier
Would numpy.fromstring and ndarray.tostring fit your needs?
-=- Olivier
2011/11/29 Alex Ter-Sarkissov ater1...@gmail.com
hi eveyone,
is there a simple command in numpy similar to matlab char(bin2dec('//some
binary value//')) to convert binary to characters and back?
thanks
I guess it's just a typo on your part, but just to make sure, you are using
.transpose(), not .transpose, correct?
-=- Olivier
2011/11/30 Karl Kappler magnetotellur...@gmail.com
Hello,
I am somewhat new to scipy/numpy so please point me in the right direction
if I am posting to an incorrect
You can also use numpy.tile
-=- Olivier
2011/12/3 Robin Kraft rkra...@gmail.com
Thanks Warren, this is great, and even handles giant arrays just fine if
you've got enough RAM.
I also just found this StackOverflow post with another solution.
a.repeat(2, axis=0).repeat(2, axis=1).
work with the result
of np.tile?
-Robin
On Dec 3, 2011, at 11:05 AM, Olivier Delalleau wrote:
You can also use numpy.tile
-=- Olivier
2011/12/3 Robin Kraft
Thanks Warren, this is great, and even handles giant arrays just fine if
you've got enough RAM.
I also just found
You can do it in one shot with:
x = np.vstack((Xstart, A[:, 0:1], Xend))
Using A[:, 0:1] instead of A[:, 0] lets you keep it as a 2d matrix (this
should answer your last question).
Then the scalars Xstart and Xend will automatically be broadcasted to
accomodate the shape of A[:, 0:1], so you
It may not be the most efficient way to do this, but you can do:
mask = b a
a[mask] = b[mask]
-=- Olivier
2011/12/6 questions anon questions.a...@gmail.com
I would like to produce an array with the maximum values out of many
(1s) of arrays.
I need to loop through many multidimentional
am I missing another step whereever b is greater than a replace b with a?
thanks
On Wed, Dec 7, 2011 at 11:55 AM, Olivier Delalleau sh...@keba.be wrote:
It may not be the most efficient way to do this, but you can do:
mask = b a
a[mask] = b[mask]
-=- Olivier
2011/12/6 questions anon
) but
because I have so many arrays I end up with a memory error so I need to
find a way to get the maximum while looping.
On Wed, Dec 7, 2011 at 12:36 PM, josef.p...@gmail.com wrote:
On Tue, Dec 6, 2011 at 7:55 PM, Olivier Delalleau sh...@keba.be wrote:
It may not be the most efficient way to do
with a memory error so I need to
find a way to get the maximum while looping.
On Wed, Dec 7, 2011 at 12:36 PM, josef.p...@gmail.com wrote:
On Tue, Dec 6, 2011 at 7:55 PM, Olivier Delalleau sh...@keba.be wrote:
It may not be the most efficient way to do this, but you can do:
mask = b a
a[mask] = b
appropriate but I am not sure
how to loop it over thousands of files.
I need to keep the first array to compare with but replace any greater
values as I loop through each array comparing back to the same array. does
that make sense?
On Wed, Dec 7, 2011 at 1:12 PM, Olivier Delalleau sh
am doing wrong whether it is something with the loop or
with the command.
On Wed, Dec 7, 2011 at 1:44 PM, josef.p...@gmail.com wrote:
On Tue, Dec 6, 2011 at 9:36 PM, Olivier Delalleau sh...@keba.be wrote:
The out=a keyword will ensure your first array will keep being
updated. So
you can do
)
print max is, Max,a is, a
On Wed, Dec 7, 2011 at 2:34 PM, Olivier Delalleau sh...@keba.be wrote:
Is 'a' a regular numpy array or something fancier?
-=- Olivier
2011/12/6 questions anon questions.a...@gmail.com
thanks again my only problem though is that the out=a in the loop does
I was trying to see if I could reproduce this problem, but your code fails
with numpy 1.6.1 with:
AttributeError: 'numpy.ndarray' object has no attribute 'H'
Is X supposed to be a regular ndarray with dtype = 'complex128', or
something else?
-=- Olivier
2011/12/5 kneil magnetotellur...@gmail.com
Maybe try stackoverflow, since this isn't really a numpy question.
To run a command like python myscript.py arg1 arg2 in a separate process,
you can do:
p = subprocess.Popen(python myscript.py arg1 arg2.split())
You can launch many of these, and if you want to know if a process p is
over, you
We have indeed been using type(a) is np.ndarray in Theano to check that.
If there's a better way, I'm interested to know as well :)
-=- Olivier
2011/12/7 josef.p...@gmail.com
If I want to know whether something that might be an array is really a
plain ndarray and not a subclass, is using
I'm probably missing something, but... Why would you want non-normalized
eigenvectors?
-=- Olivier
2011/12/20 Fahreddın Basegmez mangab...@gmail.com
Howdy,
Is it possible to get non-normalized eigenvectors from scipy.linalg.eig(a,
b)? Preferably just by using numpy.
BTW, Matlab/Octave
mangab...@gmail.com
I am computing normal-mode frequency response of a mass-spring system.
The algorithm I am using requires it.
On Tue, Dec 20, 2011 at 8:10 PM, Olivier Delalleau sh...@keba.be wrote:
I'm probably missing something, but... Why would you want non-normalized
eigenvectors
.]])
On Tue, Dec 20, 2011 at 8:40 PM, Olivier Delalleau sh...@keba.be wrote:
Hmm... ok ;) (sorry, I can't follow you there)
Anyway, what kind of non-normalization are you after? I looked at the
doc for Matlab and it just says eigenvectors are not normalized, without
additional details... so it looks
numpy.
-=- Olivier
2011/12/20 Fahreddın Basegmez mangab...@gmail.com
I don't think I can do that. I can go to the normalized results but not
the other way.
On Tue, Dec 20, 2011 at 9:45 PM, Olivier Delalleau sh...@keba.be wrote:
Hmm, sorry, I don't see any obvious logic that would explain
I'm sorry I don't have time to look closely at your code and this may not
be helpful, but just in case... I find it suspicious that you *seem* (by
quickly glancing at the code) to be taking TIME[max(temperature)] instead
of TIME[argmax(temperature)].
-=- Olivier
2011/12/20 questions anon
Aaah, thanks a lot Lennart, I knew there had to be some logic to Octave's
output, but I couldn't see it...
-=- Olivier
2011/12/21 Lennart Fricke pge08...@studserv.uni-leipzig.de
Dear Fahreddın,
I think, the norm of the eigenvectors corresponds to some generic
amplitude. But that is something
2011/12/28 Jordi Gutiérrez Hermoso jord...@octave.org
On 28 December 2011 13:41, Ralf Gommers ralf.gomm...@googlemail.com
wrote:
2011/12/28 Jordi Gutiérrez Hermoso jord...@octave.org
Just FYI, the next stable release of Octave (3.6) will have
broadcasting. I used Numpy as an
You could try A[...].fill(MyObject(...)). I haven't tried it myself, so not
sure it would work though...
-=- Olivier
2012/1/6 David Köpfer dkoep...@gmx.de
Dear numpy community,
I'm trying to create an array of type object.
A = empty(9, dtype=object)
A[ array(0,1,2) ] = MyObject(1)
A[
Original-Nachricht
Datum: Sun, 8 Jan 2012 16:16:33 -0500
Von: Olivier Delalleau sh...@keba.be
An: Discussion of Numerical Python numpy-discussion@scipy.org
Betreff: Re: [Numpy-discussion] filling an alice of array of object with
a reference to an object that has a __getitem__ method
Do you mean that listval[0] is systematically equal to 0, or is it
something else?
-=- Olivier
2012/1/9 questions anon questions.a...@gmail.com
thank you, I seem to have made some progress (with lots of help)!!
I still seem to be having trouble with the time. Because it is hourly data
for a
Not sure if there's a better way, but you can do it with
assert not numpy.allclose(numpy_result, result)
-=- Olivier
2012/1/20 Hänel Nikolaus Valentin valentin.hae...@epfl.ch
Hi,
I would like to make a sanity test to check that calling the same
function with different parameters actually
What do you mean by summarize?
If for instance you want to sum along Y, just do
my_array.sum(axis=1)
-=- Olivier
2012/1/20 Ruby Stevenson ruby...@gmail.com
hi, all
Say I have a three dimension array, X, Y, Z, how can I condense into
two dimensions: for example, compute 2-D array with (X,
You can try easy_install or pip.
-=- Olivier
2012/1/21 Peng Yu pengyu...@gmail.com
Hi,
Perl has something like ppm so that I can just use one command to
download and install perl modules. But I don't find such thing in
python. As shown on http://docs.python.org/install/index.html, it
Note sure if there's a better way, but you can do it with some custom load
and save functions:
with open('f.txt', 'w') as f:
... f.write(str(x.dtype) + '\n')
... numpy.savetxt(f, x)
with open('f.txt') as f:
... dtype = f.readline().strip()
... y = numpy.loadtxt(f).astype(dtype)
Note that if you are ok with an approximate solution, and you can assume
your data is somewhat shuffled, a simple online algorithm that uses no
memory consists in:
- choosing a small step size delta
- initializing your percentile p to a more or less random value (a
meaningful guess is better
It seems weird that it wouldn't work, as this is a pretty standard setup.
Here's a few ideas of things to check:
- Double-check it's really 32 bit Python (checking sys.maxint)
- Is there another Python installation that may cause some conflicts?
- Did you download the numpy superpack from the
, 2012 at 4:55 AM, Olivier Delalleau sh...@keba.be wrote:
It seems weird that it wouldn't work, as this is a pretty standard setup.
Here's a few ideas of things to check:
- Double-check it's really 32 bit Python (checking sys.maxint)
- Is there another Python installation that may cause some
Eric's probably right and it's indexing with a masked array that's causing
you trouble.
Since you seem to say your NaN values correspond to your mask, you should
be able to simply do:
modelData[modeData.mask] = dataMin
Note that in further processing it may then make more sense to remove the
Le 31 janvier 2012 10:50, Robert Kern robert.k...@gmail.com a écrit :
On Tue, Jan 31, 2012 at 15:35, Benjamin Root ben.r...@ou.edu wrote:
On Tue, Jan 31, 2012 at 9:18 AM, Robert Kern robert.k...@gmail.com
wrote:
On Tue, Jan 31, 2012 at 15:13, Benjamin Root ben.r...@ou.edu wrote:
I think you just can't use newaxis in advanced indexing (doc says The
newaxishttp://docs.scipy.org/doc/numpy/reference/arrays.indexing.html#numpy.newaxisobject
can be used in the basic slicing syntax, and does not mention
newaxis in the advanced indexing part).
-=- Olivier
Le 1 février 2012
Sorry but I don't understand your last question. Better / more efficient
than what?
-=- Olivier
Le 2 février 2012 07:14, Ruby Stevenson ruby...@gmail.com a écrit :
Exactly, histogram of Z, which itself is an array, for each (x, y).
sorry for getting everyone including myself confused :-)
I
numpy.where(x.mask) should do it.
-=- Olivier
Le 3 février 2012 14:02, Howard how...@renci.org a écrit :
Is there a method that gives an array of all the array indices of a
masked array where the mask is True? I've been looking through the docs and
don't see it yet...
Thanks
Howard
--
It should mean that matrix.size != a * b * c.
-=- Olivier
Le 5 février 2012 09:32, Paolo p.zaff...@yahoo.it a écrit :
Hello,
I wrote a function that works on a numpy matrix and it works fine on Mac
OS and GNU/Linux (I didn't test it on python 3).
Now I have a problem with numpy: the same
type.
Am I wrong?
Thanks for your support!
--
* From: * Olivier Delalleau sh...@keba.be;
* To: * Discussion of Numerical Python numpy-discussion@scipy.org;
* Subject: * Re: [Numpy-discussion] ValueError: total size of new array
must be unchanged only on Windows
Le 8 février 2012 00:01, Travis Oliphant tra...@continuum.io a écrit :
On Feb 7, 2012, at 12:24 PM, Sturla Molden wrote:
On 07.02.2012 19:17, Benjamin Root wrote:
print x.shape
(2, 3, 4)
print x[0, :, :].shape
(3, 4)
print x[0, :, idx].shape
(2, 3)
That looks like a bug to
It hasn't changed: since float is of a fundamentally different kind of
data, it's expected to upcast the result.
However, if I may add a personal comment on numpy's casting rules: until
now, I've found them confusing and somewhat inconsistent. Some of the
inconsistencies I've found were bugs,
Really not an expert here, but it looks like it's trying various
compilation options, some work and some don't, and for some reason it's
really unhappy about the one where it can't find Python.h.
Maybe add /usr/include/python2.6 to your CPATH, see if that helps (and make
sure permissions are
Hi,
You can subscribe here:
http://mail.scipy.org/mailman/listinfo/numpy-discussion
-=- Olivier
Le 14 février 2012 14:22, pulkit yadav yadavpul...@gmail.com a écrit :
Hello,
I am a Python enthusiast and developer. Please add me to numpy mailing
list so that I can contribute to the FLOSS
Le 15 février 2012 07:29, Martin Raspaud martin.rasp...@smhi.se a écrit :
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 14/02/12 16:48, Bruce Southey wrote:
On 02/14/2012 09:40 AM, Olivier Delalleau wrote:
Really not an expert here, but it looks like it's trying various
compilation
There may be a better way to do it, but you can first do:
a.mask = np.zeros_like(a)
then afterwards e.g. a.mask[0, 0] = True will work.
-=- Olivier
Le 18 février 2012 10:52, Chao YUE chaoyue...@gmail.com a écrit :
Dear all,
I built a new empty masked array:
In [91]: a=np.ma.empty((2,5))
Never mind. The link Francesc posted answered my question :)
-=- Olivier
Le 20 février 2012 12:54, Olivier Delalleau delal...@iro.umontreal.ca a
écrit :
Le 20 février 2012 12:46, Dag Sverre Seljebotn d.s.seljeb...@astro.uio.no
a écrit :
On 02/20/2012 09:24 AM, Olivier Delalleau wrote:
Hi
This should do what you want:
array_copy = my_array.copy()
array_copy[array_copy == 2] = 0
-=- Olivier
Le 26 février 2012 19:53, tetsuro_kiku...@jesc.or.jp a écrit :
Dear sirs,
Please allow me to ask you a beginner's question.
I have an nparray whose shape is (144, 91, 1). The elements
Sorry I can't help, but I'd just suggest to post this on the scipy mailing
list as you may get more replies there.
-=- Olivier
Le 1 mars 2012 10:24, Pierre Barthelemy bart...@gmail.com a écrit :
Dear all,
i am writing a program for data analysis. One of the functions of this
program gives
Le 3 mars 2012 10:27, Robert Kern robert.k...@gmail.com a écrit :
On Sat, Mar 3, 2012 at 14:34, Robert Kern robert.k...@gmail.com wrote:
On Sat, Mar 3, 2012 at 14:31, Ralf Gommers ralf.gomm...@googlemail.com
wrote:
Because this is also bad:
np.TAB
Display all 561 possibilities? (y or
Le 3 mars 2012 11:03, Robert Kern robert.k...@gmail.com a écrit :
On Sat, Mar 3, 2012 at 15:51, Olivier Delalleau sh...@keba.be wrote:
Le 3 mars 2012 10:27, Robert Kern robert.k...@gmail.com a écrit :
On Sat, Mar 3, 2012 at 14:34, Robert Kern robert.k...@gmail.com
wrote:
On Sat, Mar 3
Le 3 mars 2012 13:07, Joe Kington jking...@wisc.edu a écrit :
On Sat, Mar 3, 2012 at 9:26 AM, Robert Kern robert.k...@gmail.com wrote:
On Sat, Mar 3, 2012 at 15:22, Benjamin Root ben.r...@ou.edu wrote:
On Saturday, March 3, 2012, Robert Kern robert.k...@gmail.com wrote:
On Sat, Mar
Should work with:
b = numpy.ma.masked_array(b, mask=a.mask)
-=- Olivier
Le 4 mars 2012 13:01, Chao YUE chaoyue...@gmail.com a écrit :
Dear all,
I have a matrix with dimension of (360,720) but with all global data.
I have another land-sea mask matrix with only 2 unique values in it
(land=1,
Le 5 mars 2012 14:29, Keith Goodman kwgood...@gmail.com a écrit :
On Mon, Mar 5, 2012 at 11:24 AM, Neal Becker ndbeck...@gmail.com wrote:
Keith Goodman wrote:
On Mon, Mar 5, 2012 at 11:14 AM, Neal Becker ndbeck...@gmail.com
wrote:
What is a simple, efficient way to determine if all
One major difference is that Theano doesn't attempt to parse existing
Python (byte)code: you need to explicitly code with the Theano syntax
(which tries to be close to Numpy, but can end up looking quite different,
especially if you want to control the program flow with loops and ifs for
This sounds a lot like Theano, did you look into it?
-=- Olivier
Le 20 mars 2012 13:49, mark florisson markflorisso...@gmail.com a écrit :
On 13 March 2012 18:18, Travis Oliphant tra...@continuum.io wrote:
(Mark F., how does the above match how you feel about this?)
I would like
...
Dag
--
Sent from my Android phone with K-9 Mail. Please excuse my brevity.
Olivier Delalleau sh...@keba.be wrote:
This sounds a lot like Theano, did you look into it?
-=- Olivier
Le 20 mars 2012 13:49, mark florisson markflorisso...@gmail.com a
écrit :
On 13 March 2012 18:18, Travis
len(M) will give you the number of rows of M.
For columns I just use M.shape[1] myself, I don't know if there exists a
shortcut.
-=- Olivier
Le 26 mars 2012 19:03, Stephanie Cooke cooke.stepha...@gmail.com a écrit :
Hello,
I would like to extract the number of rows and columns of a matrix
It means array is a regular Python list and not a numpy array. Use
numpy.array(array) to convert it into an array.
-=- Olivier
Le 26 mars 2012 20:07, Stephanie Cooke cooke.stepha...@gmail.com a écrit :
Hello,
I am new to numpy. When I try to use the command array.shape, I get
the following
Le 27 mars 2012 06:04, Nicole Stoffels nicole.stoff...@forwind.de a écrit
:
**
Hi Pierre,
thanks for the fast answer!
I actually have timeseries of 24 hours for 459375 gridpoints in Europe.
The timeseries of every grid point is stored in a column. That's why in my
real program I already
if type(a) == numpy.ndarray:
...
if a.dtype == 'int32':
...
-=- Olivier
Le 29 mars 2012 07:54, Chao YUE chaoyue...@gmail.com a écrit :
Dear all,
how can I check type of array in if condition expression?
In [75]: type(a)
Out[75]: type 'numpy.ndarray'
In [76]: a.dtype
Out[76]:
It doesn't work because numpy.append(a, ...) doesn't modify the array a
in-place: it returns a copy.
Then in your append method, doing self = numpy.append(...) won't have any
effect: in Python such a syntax means the self local variable will now
point to the result of numpy.append, but it won't
It works for me, which version of numpy are you using?
What do you get when you type help(b.flatten)?
-=- Olivier
Le 5 avril 2012 04:45, Chao YUE chaoyue...@gmail.com a écrit :
Dear all,
Is there a small bug in following?
In [2]: b
Out[2]:
array([[ 0, 1, 2, 3, 4, 5],
[ 6,
Le 5 avril 2012 11:45, Neal Becker ndbeck...@gmail.com a écrit :
Adam Hughes wrote:
If you are storing objects, then can't you store them in a list and just
do:
for obj in objectlist:
obj.attribute = value
Or am I misunderstanding?
It's multi-dimensional, and I wanted to
2012/5/15 Travis Oliphant tra...@continuum.io
On May 14, 2012, at 7:07 PM, Stéfan van der Walt wrote:
Hi Zach
On Mon, May 14, 2012 at 4:33 PM, Zachary Pincus zachary.pin...@yale.edu
wrote:
The below seems to be a bug, but perhaps it's unavoidably part of the
indexing mechanism?
Should be dt3.compressed()
-=- Olivier
2012/5/23 Chao YUE chaoyue...@gmail.com
Dear all,
is there a command for retrieving unmasked data from a mask array?
excepting using dt3[~dt3.mask].flatten()?
thanks,
Chao
--
2012/5/23 Nathaniel Smith n...@pobox.com
On Wed, May 23, 2012 at 6:29 PM, Travis Oliphant tra...@continuum.io
wrote:
Then are you suggesting that we need to back out the changes to the
casting
rules as well, because this will also cause code to stop working. This
is
part of my point.
+1 for a numpy-users list without dev noise.
-=- Olivier
2012/6/28 Travis Oliphant tra...@continuum.io
There are some good ideas here.
I propose splitting this list into devel and users lists.
This might best be done by creating a new list for users and using this
list for development.
2012/6/28 David Cournapeau courn...@gmail.com
Hi Travis,
On Thu, Jun 28, 2012 at 1:25 PM, Travis Oliphant tra...@continuum.io
wrote:
Hey all,
I'd like to propose dropping support for Python 2.4 in NumPy 1.8 (not
the 1.7 release). What does everyone think of that?
I think it
2012/6/28 Ralf Gommers ralf.gomm...@googlemail.com
On Thu, Jun 28, 2012 at 4:44 PM, Olivier Delalleau sh...@keba.be wrote:
2012/6/28 David Cournapeau courn...@gmail.com
Hi Travis,
On Thu, Jun 28, 2012 at 1:25 PM, Travis Oliphant tra...@continuum.io
wrote:
Hey all,
I'd like
2012/11/12 Nathaniel Smith n...@pobox.com
On Mon, Nov 12, 2012 at 8:54 PM, Matthew Brett matthew.br...@gmail.com
wrote:
Hi,
I wanted to check that everyone knows about and is happy with the
scalar casting changes from 1.6.0.
Specifically, the rules for (array, scalar) casting have
2012/11/12 Matthew Brett matthew.br...@gmail.com
Hi,
On Mon, Nov 12, 2012 at 8:15 PM, Benjamin Root ben.r...@ou.edu wrote:
On Monday, November 12, 2012, Olivier Delalleau wrote:
2012/11/12 Nathaniel Smith n...@pobox.com
On Mon, Nov 12, 2012 at 8:54 PM, Matthew Brett
matthew.br
How are you monitoring memory usage?
Personally I've been using psutil and it seems to work well, although I've
used it only on Windows and not in applications with large numpy arrays, so
I can't tell whether it would work you.
Also, keep in mind that:
- The auto-delete object when it goes out of
2012/11/16 Charles R Harris charlesr.har...@gmail.com
On Thu, Nov 15, 2012 at 8:24 PM, Gökhan Sever gokhanse...@gmail.comwrote:
Hello,
Could someone briefly explain why are these two operations are casting my
float32 arrays to float64?
I1 (np.arange(5, dtype='float32')).dtype
O1
2012/11/16 Olivier Delalleau olivier.delall...@gmail.com
2012/11/16 Charles R Harris charlesr.har...@gmail.com
On Thu, Nov 15, 2012 at 11:37 PM, Charles R Harris
charlesr.har...@gmail.com wrote:
On Thu, Nov 15, 2012 at 8:24 PM, Gökhan Sever gokhanse...@gmail.comwrote:
Hello,
Could
2012/11/17 Gökhan Sever gokhanse...@gmail.com
On Sat, Nov 17, 2012 at 9:47 AM, Nathaniel Smith n...@pobox.com wrote:
On Fri, Nov 16, 2012 at 9:53 PM, Gökhan Sever gokhanse...@gmail.com
wrote:
Thanks for the explanations.
For either case, I was expecting to get float32 as a resulting
Current behavior looks sensible to me. I personally would prefer no warning
but I think it makes sense to have one as it can be helpful to detect
issues faster.
-=- Olivier
2012/11/21 Charles R Harris charlesr.har...@gmail.com
What should be the value of the mean, var, and std of empty arrays?
2012/12/10 Allan Kamau kamaual...@gmail.com
I did add the paths to LD_LIBRARY_PATH as advised (see below), then
python setup.py clean;python setup.py build;python setup.py install; but
the same error persists.
export LAPACK=/usr/lib/lapack/liblapack.so;export
I'd say it's a good idea, although I hope 1.7.x will still be maintained
for a while for those who are still stuck with Python 2.4-5 (sometimes you
don't have a choice).
-=- Olivier
2012/12/13 Charles R Harris charlesr.har...@gmail.com
The previous proposal to drop python 2.4 support garnered
2012/12/13 Chris Barker - NOAA Federal chris.bar...@noaa.gov
On Thu, Dec 13, 2012 at 3:01 PM, Bradley M. Froehle
brad.froe...@gmail.com wrote:
Yes, but the point was that since you can live with an older version on
Python you can probably live with an older version of NumPy.
exactly --
2013/1/3 Andrew Collette andrew.colle...@gmail.com:
Hi Dag,
If neither is objectively better, I think that is a very good reason to
kick it down to the user. Explicit is better than implicit.
I agree with you, up to a point. However, we are talking about an
extremely common operation that
2013/1/3 Andrew Collette andrew.colle...@gmail.com:
Another solution is to forget about trying to be smart and always
upcast the operation. That would be my 2nd preferred solution, but it
would make it very annoying to deal with Python scalars (typically
int64 / float64) that would be
2013/1/4 Nathaniel Smith n...@pobox.com:
On Fri, Jan 4, 2013 at 11:09 AM, Matthew Brett matthew.br...@gmail.com
wrote:
Hi,
Reading the discussion on the scalar casting rule change I realized I
was hazy on the use-cases that led to the rule that scalars cast
differently from arrays.
My
(sorry, no time for full reply, so for now just answering what I
believe is the main point)
2013/1/4 Andrew Collette andrew.colle...@gmail.com:
The ValueError is here to warn you that the operation may not be doing
what you want. The rollover for smaller values would be the documented
(and
2013/1/5 Nathaniel Smith n...@pobox.com:
On Fri, Jan 4, 2013 at 5:25 PM, Andrew Collette
andrew.colle...@gmail.com wrote:
I agree the current behavior is confusing. Regardless of the details
of what to do, I suppose my main objection is that, to me, it's really
unexpected that adding a
2013/1/6 Nathaniel Smith n...@pobox.com:
On Mon, Jan 7, 2013 at 1:43 AM, Olivier Delalleau sh...@keba.be wrote:
2013/1/5 Nathaniel Smith n...@pobox.com:
On Fri, Jan 4, 2013 at 5:25 PM, Andrew Collette
andrew.colle...@gmail.com wrote:
I agree the current behavior is confusing. Regardless
2013/1/8 Andrew Collette andrew.colle...@gmail.com:
Hi,
I think you are voting strongly for the current casting rules, because
they make it less obvious to the user that scalars are different from
arrays.
Maybe this is the source of my confusion... why should scalars be
different from
2013/1/8 Sebastian Berg sebast...@sipsolutions.net:
On Tue, 2013-01-08 at 19:59 +, Nathaniel Smith wrote:
On 8 Jan 2013 17:24, Andrew Collette andrew.colle...@gmail.com wrote:
Hi,
I think you are voting strongly for the current casting rules, because
they make it less obvious to
2013/1/8 Chris Barker - NOAA Federal chris.bar...@noaa.gov:
On Tue, Jan 8, 2013 at 12:43 PM, Alan G Isaac alan.is...@gmail.com wrote:
New users don't use narrow-width dtypes... it's important to remember
1. I think the first statement is wrong.
Control over dtypes is a good reason for
a new
Le mardi 8 janvier 2013, Andrew Collette a écrit :
Hi Dag,
So you are saying that, for an array x, you want
x + random.randint(10)
to produce an array with a random dtype?
Under the proposed behavior, depending on the dtype of x and the value
from random, this would sometimes
1 - 100 of 196 matches
Mail list logo