I'm using windows datetimes (100nano-seconds since 0001,1,1) as time
in a numpy array and was hit by this behaviour.
>>> numpy.__version__
'1.0b4'
>>> a=numpy.array([63292539433000L],numpy.uint64)
>>> t=a[0]
>>> t
63292539433000L
>>> type(t)
>>> t+1
6.3292539433e+017
>>> type(t+1)
>>> t=
> To answer the original question, you need to use a higher precision
> array or explicitly cast it to higher precision.
>
> In [49]:(a.astype(int)*100)/100
> Out[49]:array([200])
Thank you. This is what I wanted to know.
Lars
--
Andrew Straw wrote:
> LANDRIU David SAp wrote:
>> Hello,
>>
>> I come back to my question : how to use numarray
>> with the numpy installation ?
>>
>> {ccali22}~(0)>setenv PYTHONPATH /usr/local/lib/python2.3/site-packages/numpy
>>
> Here's where you went wrong. You want:
>
> setenv P
Keith Goodman wrote:
> I plan to build an amd64 box and run debian etch. Are there any big,
> 64-bit, show-stopping problems in numpy? Any minor annoyances?
>
I am not aware of any - we use fine on 32bit and 64bit with debian sarge
and etch.
-Sebastian Haase
On 8/30/06, Lars Friedrich <[EMAIL PROTECTED]> wrote:
Hello,I would like to discuss the following code:#***start***import numpy as Na = N.array((200), dtype = N.uint8)print (a * 100) / 100b = N.array((200, 200), dtype = N.uint8)print (b * 100) / 100
#***stop***The first print statement will print "
On 8/30/06, Lars Friedrich <[EMAIL PROTECTED]> wrote:
Hello,I would like to discuss the following code:#***start***import numpy as Na = N.array((200), dtype = N.uint8)print (a * 100) / 100This is actually a scalar, i.e., a zero dimensional array.
N.uint8(200) would give you the same thing, because
On 8/30/06, Robert Kern <[EMAIL PROTECTED]> wrote:
> I don't see where we're calling Py_FatalError. The problem might be in Python
> or
> mwadap. Indeed, import_array() raises a PyExc_ImportError.
Sorry for the noise: it looks like this was already fixed:
http://projects.scipy.org/scipy/numpy/c
Fernando Perez wrote:
> Hi all,
>
> this was mentioned in the past, but I think it fell through the cracks:
>
> Python 2.3.4 (#1, Mar 10 2006, 06:12:09)
> [GCC 3.4.5 20051201 (Red Hat 3.4.5-2)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import mwadap
Hi all,
this was mentioned in the past, but I think it fell through the cracks:
Python 2.3.4 (#1, Mar 10 2006, 06:12:09)
[GCC 3.4.5 20051201 (Red Hat 3.4.5-2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import mwadap
Overwriting info= from scipy.misc (wa
On 8/30/06, Sven Schreiber <[EMAIL PROTECTED]> wrote:
> Mathew Yeates schrieb:
> will be a numpy matrix, use if you don't like that. But here
> it's really nice to work with matrices, because otherwise .sum() will
> give you a 1-d array sometimes, and that will suddenly look like a row
> to (inst
Hi,
currently I´m trying to compile the latest numpy version (1.0b4) under an SGI
IRIX 6.5 environment. I´m using the gcc 3.4.6 compiler and python 2.4.3 (self
compiled). During the compilation of numpy.core I get a nasty error message:
...
copying build/src.irix64-6.5-2.4/numpy/__config__.py ->
Tim Hochberg wrote:
> Johannes Loehnert wrote:
>>> I'm somewhat new to both libraries...is there any way to create a 2D
>>> array of pixel values from an image object from the Python Image
>>> Library? I'd like to do some arithmetic on the values.
the latest version of PIL (maybe not released yet)
Johannes Loehnert wrote:
> Am Mittwoch, 30. August 2006 19:20 schrieb Ghalib Suleiman:
>
>> I'm somewhat new to both libraries...is there any way to create a 2D
>> array of pixel values from an image object from the Python Image
>> Library? I'd like to do some arithmetic on the values.
>>
>
Am Mittwoch, 30. August 2006 19:20 schrieb Ghalib Suleiman:
> I'm somewhat new to both libraries...is there any way to create a 2D
> array of pixel values from an image object from the Python Image
> Library? I'd like to do some arithmetic on the values.
Yes.
To transport the data:
>>> import num
I'm somewhat new to both libraries...is there any way to create a 2D
array of pixel values from an image object from the Python Image
Library? I'd like to do some arithmetic on the values.
-
Using Tomcat but need to do mor
Andrew Straw wrote:
>> {ccali22}~(0)>setenv PYTHONPATH /usr/local/lib/python2.3/site-packages/numpy
>>
> Here's where you went wrong. You want:
>
> setenv PYTHONPATH /usr/local/lib/python2.3/site-packages
Which you shouldn't need at all. site-packages should be on sys.path by
default.
-Chris
Hello,
I would like to discuss the following code:
#***start***
import numpy as N
a = N.array((200), dtype = N.uint8)
print (a * 100) / 100
b = N.array((200, 200), dtype = N.uint8)
print (b * 100) / 100
#***stop***
The first print statement will print "200" because the uint8-value is
cast "upw
On Wed, Aug 30, 2006 at 12:04:22PM +0100, Andrew Jaffe wrote:
> the current implementation of fftfreq (which is meant to return the
> appropriate frequencies for an FFT) does the following:
>
> k = range(0,(n-1)/2+1)+range(-(n/2),0)
> return array(k,'d')/(n*d)
>
> I have tried this wit
LANDRIU David SAp wrote:
> Hello,
>
> I come back to my question : how to use numarray
> with the numpy installation ?
>
> {ccali22}~(0)>setenv PYTHONPATH /usr/local/lib/python2.3/site-packages/numpy
>
Here's where you went wrong. You want:
setenv PYTHONPATH /usr/local/lib/python2.3/
I plan to build an amd64 box and run debian etch. Are there any big,
64-bit, show-stopping problems in numpy? Any minor annoyances?
-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done qui
On 8/30/06, Stefan van der Walt <[EMAIL PROTECTED]> wrote:
> The current behaviour makes sense, but is maybe not consistent:
>
> N.array([],dtype=object).size == 1
> N.array([[],[]],dtype=object).size == 2
Yes, including one more term in this check:
In [5]: N.array([],dtype=object).size
Out[5]:
On Tue, Aug 29, 2006 at 03:46:45PM -0700, Mathew Yeates wrote:
> My head is about to explode.
>
> I have an M by N array of floats. Associated with the columns are
> character labels
> ['a','b','b','c','d','e','e','e'] note: already sorted so duplicates
> are contiguous
>
> I want to replace t
On Aug 30, 2006, at 8:51 AM, LANDRIU David SAp wrote:
> Hello,
>
> I come back to my question : how to use numarray
> with the numpy installation ?
>
If you are using both at the same time, one thing you don't want to
do is
from numpy import *
from numarray import *
You can do that with on
Torgil Svensson wrote:
>>return uL,asmatrix(fromiter((idx[x] for x in L),dtype=int))
>>
>
> Is it possible for fromiter to take an optional shape (or count)
> argument in addition to the dtype argument?
Yes. fromiter(iterable, dtype, count) works.
> If both is given it could
> preallocat
Hi David,
Numeric, numarray and numpy are three different packages that can
live independently, but that can also coexist if you like so. If you're new
to this packages, you should stick to numpy, as the other ones are
getting phased out.
It's difficult to see what's going wrong without having se
Hello,
I come back to my question : how to use numarray
with the numpy installation ?
After some update in the system there is another
error message :
>> AttributeError: 'module' object has no attribute 'NewAxis'
It seems , from advice of the system manager, that an kind of
ali
Mathew Yeates schrieb:
> My head is about to explode.
>
> I have an M by N array of floats. Associated with the columns are
> character labels
> ['a','b','b','c','d','e','e','e'] note: already sorted so duplicates
> are contiguous
>
> I want to replace the 2 'b' columns with the sum of the 2 c
On Tue, Aug 29, 2006 at 10:49:58AM -0600, Travis Oliphant wrote:
> Matt Knox wrote:
> > is the following behaviour expected? or is this a bug with
> > numpy.object_ ? I'm using numpy 1.0b1
> >
> > >>> print numpy.array([],numpy.float64).size
> > 0
> >
> > >>> print numpy.array([],numpy.object_
[copied to the scipy list since rfftfreq is only in scipy]
Andrew Jaffe wrote:
> Hi all,
>
> the current implementation of fftfreq (which is meant to return the
> appropriate frequencies for an FFT) does the following:
>
> k = range(0,(n-1)/2+1)+range(-(n/2),0)
> return array(k,'d')/(
Hi all,
the current implementation of fftfreq (which is meant to return the
appropriate frequencies for an FFT) does the following:
k = range(0,(n-1)/2+1)+range(-(n/2),0)
return array(k,'d')/(n*d)
I have tried this with very long (2**24) arrays, and it is ridiculously
slow. Should th
Hello,
is it necessary to install numarray separately to use numpy ?
Indeed, after numpy installation, when I try to use it in the code,
I get the same error as below :
.../...
Python 2.4.1 (#1, May 13 2005, 13:45:18)
[GCC 3.2.3 20030502 (Red Hat Linux 3.2.3-42)] on linux2
Type "help"
Charles R Harris schrieb:
> You can get what you expect using matrices:
>
...
> But generally it is best to just use arrays and get used to the conventions.
>
Well, there are different views on this subject, and I'm happy that the
numpy crew is really trying (and good at it) to make array *and*
Travis,
A sparse matrix is a different animal serving a different purpose, i.e.,
solution of linear systems. Those storage formats are geared for that
application: upper diagonal, block diagonal, stripwise, etc.
To be more specific: here tight numerical arrays are presumably
discussed. Python a
Hi, Travis
I tried numpy1.0b4 and add this to setup.py
includes = ["numpy.core._internal"]
then it works! And all scripts can be packed into a single executables with
"bundle_files":2,
"skip_archive":0,
zipfile = None,
--skip_archive option is not needed now.
34 matches
Mail list logo