>> OK. I don't know if you have a patch tracking system, so I'll just
>> post it here. If you have a patch tracker, point me to it and I'll
>> enter the patch there.
>
> http://projects.scipy.org/scipy/numpy
OK, entered as ticket #586.
Cheers,
Stuart
___
Stuart Brorson wrote:
> Robert,
>
> Thanks for your answers about histogram's meaning for range=(7, 0)!
>
>>> * If it truely isn't meaningful, why not catch the case and reject
>>> input? Maybe this is a bug ???
>> Patches are welcome.
>
> OK. I don't know if you have a patch tracking sy
Robert,
Thanks for your answers about histogram's meaning for range=(7, 0)!
>> * If it truely isn't meaningful, why not catch the case and reject
>> input? Maybe this is a bug ???
>
> Patches are welcome.
OK. I don't know if you have a patch tracking system, so I'll just
post it here. I
Hey folks,
There is a new Python Magazine out there:
http://www.pythonmagazine.com/
Let's get a numpy article in there!
NOTE: I have nothing to do with the production of the magazine, I'd just
like to have it be a success so I can read it.
--
Christopher Barker, Ph.D.
Oceanographer
Emergen
My bad...I also note that I forgot to decrement the descending list in
my example. Ignore
Robert Kern wrote:
> Mark.Miller wrote:
>> Check how you're implementing the histogram function with respect to
>> that range statement. It seems to make a difference, desirable or not.
>>
>> >>> imp
Mark.Miller wrote:
> Check how you're implementing the histogram function with respect to
> that range statement. It seems to make a difference, desirable or not.
>
> >>> import numpy
> >>> numpy.__version__
> '1.0.4.dev3982'
> >>> A = numpy.array([1, 2, 3, 4, 5, 6, 5, 4, 5, 4, 3, 2, 1])
> >
Check how you're implementing the histogram function with respect to
that range statement. It seems to make a difference, desirable or not.
>>> import numpy
>>> numpy.__version__
'1.0.4.dev3982'
>>> A = numpy.array([1, 2, 3, 4, 5, 6, 5, 4, 5, 4, 3, 2, 1])
>>> (x, y) = numpy.histogram(A, rang
Stuart Brorson wrote:
> Guys --
>
> I'm a little puzzled by a NumPy behavior. Perhaps the gurus on this
> list can enlighten me, please!
>
> I am working with numpy.histogram. I have a decent understanding of
> how it works when given an ascending range to bin into. However, when
> I give it a
On 05/10/2007, Christopher Barker <[EMAIL PROTECTED]> wrote:
> I don't know how to generalize this to n-d though -- maybe numpy.vectorize?
Oops! Looks like there's a big somewhere:
In [1]: from numpy import *
In [2]: vectorize(lambda x: "%5.3g" % x)(ones((2,2,2)))
Out[2]:
array([[[' ', '\xc1'],
Guys --
I'm a little puzzled by a NumPy behavior. Perhaps the gurus on this
list can enlighten me, please!
I am working with numpy.histogram. I have a decent understanding of
how it works when given an ascending range to bin into. However, when
I give it a *decending* range, I can't figure out
Matthieu Brucher wrote:
> And if there is a way to add a
> formatting option ('1.1f' for instance), it would be
> even better.
For full control of the formatting, you can use python's string
formatting, and a nested list comprehension:
[ ["%.3f"%i
On Fri, 05 Oct 2007, dmitrey wrote:
> I have an array like array([ 1., 0., 2., -10.])
> what is most efficient (i.e. fastest) way to convert the one to array of
> integers?
> array([ 1, 0, 2, -10])
Use ``astype``.
Cheers,
Alan Isaac
>>> import numpy as N
>>> x = N.array([1,2,3],dtype='
John Hunter wrote:
> On 9/26/07, Robert Kern <[EMAIL PROTECTED]> wrote:
>
>> Here is the straightforward way:
>>
>> In [15]: import numpy as np
>>
>> In [16]: dt = np.dtype([('foo', int), ('bar', float)])
>>
>> In [17]: r = np.zeros((3,3), dtype=dt)
>
> Here is a (hopefully) simple question. If
Try
r = r.view(numpy.recarray)
barry
On 10/5/07, John Hunter <[EMAIL PROTECTED]> wrote:
> On 9/26/07, Robert Kern <[EMAIL PROTECTED]> wrote:
>
> > Here is the straightforward way:
> >
> > In [15]: import numpy as np
> >
> > In [16]: dt = np.dtype([('foo', int), ('bar', float)])
> >
> > In [17]:
On 9/26/07, Robert Kern <[EMAIL PROTECTED]> wrote:
> Here is the straightforward way:
>
> In [15]: import numpy as np
>
> In [16]: dt = np.dtype([('foo', int), ('bar', float)])
>
> In [17]: r = np.zeros((3,3), dtype=dt)
Here is a (hopefully) simple question. If I create an array like
this, how c
On 10/5/07, Neal Becker <[EMAIL PROTECTED]> wrote:
>
> Charles R Harris wrote:
>
> > On 10/5/07, Neal Becker <[EMAIL PROTECTED]> wrote:
> >>
> >> Charles R Harris wrote:
> >>
> >> > On 10/5/07, Neal Becker <[EMAIL PROTECTED]> wrote:
> >> >>
> >> >> I'm thinking (again) about using numpy for signal
Charles R Harris wrote:
> On 10/5/07, Neal Becker <[EMAIL PROTECTED]> wrote:
>>
>> Charles R Harris wrote:
>>
>> > On 10/5/07, Neal Becker <[EMAIL PROTECTED]> wrote:
>> >>
>> >> I'm thinking (again) about using numpy for signal processing
>> >> applications. One issue is that there are more data t
On 10/5/07, Neal Becker <[EMAIL PROTECTED]> wrote:
>
> Charles R Harris wrote:
>
> > On 10/5/07, Neal Becker <[EMAIL PROTECTED]> wrote:
> >>
> >> I'm thinking (again) about using numpy for signal processing
> >> applications. One issue is that there are more data types that are
> >> commonly used i
On Friday, 05 October 2007, Neal Becker wrote:
> I'm thinking (again) about using numpy for signal processing applications.
> One issue is that there are more data types that are commonly used in
> signal processing that are not available in numpy (or python).
> Specifically, it is frequently req
Charles R Harris wrote:
> On 10/5/07, Neal Becker <[EMAIL PROTECTED]> wrote:
>>
>> I'm thinking (again) about using numpy for signal processing
>> applications. One issue is that there are more data types that are
>> commonly used in signal processing that are not available in numpy (or
>> python)
Hi Gael,
I will ask the guy who installed the system yesterday, so that I hope he
can fix it on monday without me having to re-install all the libraries I
installed already
Thanks a lot for the help
All the best
Simone
Gael Varoquaux wrote:
> On Fri, Oct 05, 2007 at 05:35:46PM +0200, Simone Ma
On Fri, Oct 05, 2007 at 05:35:46PM +0200, Simone Marras wrote:
>[EMAIL PROTECTED]:/home> df -h
>FilesystemSize Used Avail Use% Mounted on
>/dev/sda2 7.4G 7.0G 14M 100% /
>udev 506M 112K 506M 1% /dev
>/dev/sda6 69G 1
Hi there, here the output,
thanks
[EMAIL PROTECTED]:/home> df -h
FilesystemSize Used Avail Use% Mounted on
/dev/sda2 7.4G 7.0G 14M 100% /
udev 506M 112K 506M 1% /dev
/dev/sda6 69G 14G 52G 22% /home
/dev/sdb1 459G 295G
On Fri, Oct 05, 2007 at 05:11:25PM +0200, Simone Marras wrote:
>thanks a lot for replying. Look, actually my machine is bare new, so I
>dont understand why my /tmp gets full for every small operation I do. Now
>I couldnt even send out an email. do you know what this problem could be?
L
Hi Emanuele,
thanks a lot for replying. Look, actually my machine is bare new, so I
dont understand why my /tmp gets full for every small operation I do.
Now I couldnt even send out an email. do you know what this problem
could be?
Thank you,
All the best
Simone
Emanuele Olivetti wrote:
> Simo
On 10/5/07, Neal Becker <[EMAIL PROTECTED]> wrote:
>
> I'm thinking (again) about using numpy for signal processing applications.
> One issue is that there are more data types that are commonly used in
> signal processing that are not available in numpy (or python).
> Specifically, it is frequently
Thank you for the precision, I didn't thought of using 'Sxx' directly :(
Matthieu
2007/10/5, lorenzo bolla <[EMAIL PROTECTED]>:
>
> gotcha. specify the number of bytes, then.
>
> In [20]: x
> Out[20]:
> array([[-2., 3.],
>[ 4., 5.]])
>
> In [21]: x.astype(numpy.dtype('S10'))
> Out[21]:
Simone Marras wrote:
> Hello everyone,
>
> I am trying to install numpy on my Suse 10.2 using Python 2.5
> Python is correctly installed and when I launch > python setup.py
> install, I get the following error:
>
> numpy/core/src/multiarraymodule.c:7604: fatal error: error writing
> to /tmp/ccN
gotcha. specify the number of bytes, then.
In [20]: x
Out[20]:
array([[-2., 3.],
[ 4., 5.]])
In [21]: x.astype(numpy.dtype('S10'))
Out[21]:
array([['-2.0', '3.0'],
['4.0', '5.0']],
dtype='|S10')
L.
On 10/5/07, Matthieu Brucher <[EMAIL PROTECTED]> wrote:
>
> I'd like to hav
On 05/10/2007, Matthieu Brucher <[EMAIL PROTECTED]> wrote:
> I'd like to have the '2.', because if the number is negative, only '-' is
> returned, not the real value.
For string arrays you need to specify the length of the string as part
of the data type (and it defaults to length 1):
In [11]: ra
Hello everyone,
I am trying to install numpy on my Suse 10.2 using Python 2.5
Python is correctly installed and when I launch > python setup.py
install, I get the following error:
numpy/core/src/multiarraymodule.c:7604: fatal error: error writing
to /tmp/ccNImg9Q.s: No space left on devicetee
I'd like to have the '2.', because if the number is negative, only '-' is
returned, not the real value.
Matthieu
2007/10/5, lorenzo bolla <[EMAIL PROTECTED]>:
>
> what's wrong with astype?
>
> In [3]: x = numpy.array([[2.,3.],[4.,5.]])
>
> In [4]: x.astype(str)
> Out[4]:
> array([['2', '3'],
>
I'm thinking (again) about using numpy for signal processing applications.
One issue is that there are more data types that are commonly used in
signal processing that are not available in numpy (or python).
Specifically, it is frequently required to convert floating point
algorithms into integer
what's wrong with astype?
In [3]: x = numpy.array([[2.,3.],[4.,5.]])
In [4]: x.astype(str)
Out[4]:
array([['2', '3'],
['4', '5']],
dtype='|S1')
and if you want a list:
In [5]: x.astype(str).tolist()
Out[5]: [['2', '3'], ['4', '5']]
L.
On 10/5/07, Matthieu Brucher <[EMAIL PROTEC
what about astype?
a.astype(t) -> Copy of array cast to type t.
Cast array m to type t. t can be either a string representing a
typecode,
or a python type object of type int, float, or complex.
L.
On 10/5/07, dmitrey <[EMAIL PROTECTED]> wrote:
>
> hi all,
> I have an array like
> arra
I usually use the astype method.
>>> import numpy as n
>>> a = n.array([1.,0.,2.,-10.])
>>> a.dtype
dtype('float64')
>>> print a
[ 1. 0. 2. -10.]
>>> b = a.astype(n.integer)
>>> b.dtype
dtype('int32')
>>> print b
[ 1 0 2 -10]
dmitrey wrote:
> hi all,
> I have an array like
> arr
hi all,
I have an array like
array([ 1., 0., 2., -10.])
what is most efficient (i.e. fastest) way to convert the one to array of
integers?
array([ 1, 0, 2, -10])
Thx in advance, D.
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http:
Hi,
I'm trying to cast a float array into a string array (for instance
transforming [[2., 3.], [4., 5.]] into [['2.', '3.'], ['4.', '5.']]), I
tried with astype(str) and every variation (str_, string, string_, string0),
but not luck.
Is there a function or a method of the array class that can fulf
38 matches
Mail list logo