On 11/29/06, Mathew Yeates <[EMAIL PROTECTED]> wrote:
whoa. I just found out that A=A.transpose() does nothing but change A's
flags from C_CONTIGUOUS to F_CONTIGUOUS!!
Okay, so heres the question .. I am reading data into the columns of
a matrix. In order to speed this up, I want to read va
On 11/29/06, Mathew Yeates <[EMAIL PROTECTED]> wrote:
whoa. I just found out that A=A.transpose() does nothing but change A's
flags from C_CONTIGUOUS to F_CONTIGUOUS!!
Okay, so heres the question .. I am reading data into the columns of
a matrix. In order to speed this up, I want to read va
whoa. I just found out that A=A.transpose() does nothing but change A's
flags from C_CONTIGUOUS to F_CONTIGUOUS!!
Okay, so heres the question .. I am reading data into the columns of
a matrix. In order to speed this up, I want to read values into the rows
of a matrix and when I am all done,
Hmm
I'm trying to duplicate the behavior with a simple program
-
import numpy
datasize=5529000
numrows=121
fd=open("biggie","w")
fd.close()
big=numpy.memmap("biggie",mode="readwrite",
shape=(numrows,datasize),dtype=numpy.float32)
c=numpy.ones(shape=(datasize,),dtype=numpy.float32)
for r
Mathew Yeates wrote:
> Hi
>
> I have a line in my program that looks like
> outarr[1,:] = computed_array
> where outarr is a memory mapped file. This takes forever.
>
> I checked and copying the data using "cp" at the command line takes 1
> or 2 seconds. So the problem can't be attributed simp
Hi
I have a line in my program that looks like
outarr[1,:] = computed_array
where outarr is a memory mapped file. This takes forever.
I checked and copying the data using "cp" at the command line takes 1
or 2 seconds. So the problem can't be attributed simply to disk i/o. Is
it because the el
Torgil Svensson wrote:
> It works if you replace the strings '2','3','5','6' with numbers instead.
duh! I can't believe I didn't see that!
-Chris
--
Christopher Barker, Ph.D.
Oceanographer
Emergency Response Division
NOAA/NOS/OR&R(206) 526-6959 voice
7600 Sand Point Way NE (2
It works if you replace the strings '2','3','5','6' with numbers instead.
This case got a better error-message:
>>> array(['2'],dtype=float32)
Traceback (most recent call last):
File "", line 1, in ?
TypeError: a float is required
//Torgil
On 11/29/06, Lionel Roubeyrie <[EMAIL PROTECTED]> wr
Lionel Roubeyrie wrote:
> Hi all,
> I don't understand why can't I do that:
> b=array([(datetime.datetime(2006,11,29),'2','3'),
> (datetime.datetime(2006,11,30),'5','6')], dtype=[('Dates', 'object'),
> ('HUM', 'float32'), ('TEM', 'float32')])
> ValueError: tried to set void-array with object member
On Wednesday 29 November 2006 14:41, [EMAIL PROTECTED] wrote:
> Hi,
>
> I think that the following command and result are a little bit inconsistant
> and a source of error. I don't understand why: dtype=float32 for a result
> when it's invalid in the definition.
I'm afraid I don;t understand the l
[EMAIL PROTECTED] wrote:
> Hi,
>
> I think that the following command and result are a little bit inconsistant
> and a source of error. I don't understand why: dtype=float32 for a result
> when it's invalid in the definition.
float32 is an object in the numpy module, i.e. to access it, you must
Hi,
I think that the following command and result are a little bit inconsistant
and a source of error. I don't understand why: dtype=float32 for a result
when it's invalid in the definition.
N.
In [8]: a = numpy.array([1],dtype=float32)
--
Tim Hochberg wrote:
>things are often not as easy as they appear, the real reason I'm writing
>is this comment that explains why object arrays are disallowed in
>fromiter (multiarraymodule.c::PyArray_:FromIter)
>
>/* We would need to alter the memory RENEW code to decrement any
>
Hi all,
I don't understand why can't I do that:
b=array([(datetime.datetime(2006,11,29),'2','3'),
(datetime.datetime(2006,11,30),'5','6')], dtype=[('Dates', 'object'),
('HUM', 'float32'), ('TEM', 'float32')])
ValueError: tried to set void-array with object members using buffer.
Thanks
--
Lionel R
14 matches
Mail list logo