On May 27, 2009, at 7:29 PM, Stéfan van der Walt wrote:
> Hi Fernando
>
> 2009/5/28 Fernando Perez :
>> Well, since dtypes allow for nesting full arrays in this fashion,
>> where I can say that the 'block' field can have (2,3) shape, it seems
>> like it would be nice to be able to express this ne
2009/5/27 Stéfan van der Walt :
> Hi Fernando
>
> 2009/5/28 Fernando Perez :
>> Well, since dtypes allow for nesting full arrays in this fashion,
>> where I can say that the 'block' field can have (2,3) shape, it seems
>> like it would be nice to be able to express this nesting into loading
>> of p
Hi Fernando
2009/5/28 Fernando Perez :
> Well, since dtypes allow for nesting full arrays in this fashion,
> where I can say that the 'block' field can have (2,3) shape, it seems
> like it would be nice to be able to express this nesting into loading
> of plain text files as well.
I think that wo
On May 27, 2009, at 7:10 PM, Fernando Perez wrote:
> Hi Pierre,
>
> On Wed, May 27, 2009 at 4:03 PM, Pierre GM
> wrote:
>> Oh yes indeed. Yet another case of "I-opened-my-mouth-too-soon'...
>>
>> OK, so there's a trick. Kinda:
>> * Define a specific converter:
>>
>
> Thanks, that's an alternat
Hi Pierre,
On Wed, May 27, 2009 at 4:03 PM, Pierre GM wrote:
> Oh yes indeed. Yet another case of "I-opened-my-mouth-too-soon'...
>
> OK, so there's a trick. Kinda:
> * Define a specific converter:
>
Thanks, that's an alternative, though I think I prefer my two-pass
hack, though I can't quite re
Hi Stefan,
2009/5/27 Stéfan van der Walt :
> Hi Fernando
>
> 2009/5/27 Fernando Perez :
>> I'm wondering if the code below illustrates a bug in loadtxt, or just
>> a 'live with it' limitation.
>
> I'm not sure whether this is a bug or not.
>
> By specifying the dtype
>
>> dt = dtype(dict(names=['n
On May 27, 2009, at 6:15 PM, Fernando Perez wrote:
> Hi Pierre,
>
> On Wed, May 27, 2009 at 3:01 PM, Pierre GM
> wrote:
>> Have you tried np.lib.io.genfromtxt ?
>>
>
> I didn't know about it, but it has the same problem as loadtxt:
Oh yes indeed. Yet another case of "I-opened-my-mouth-too-soo
Hi Fernando
2009/5/27 Fernando Perez :
> I'm wondering if the code below illustrates a bug in loadtxt, or just
> a 'live with it' limitation.
I'm not sure whether this is a bug or not.
By specifying the dtype
> dt = dtype(dict(names=['name','x','y','block'],
>formats=['S4',float
Hi Pierre,
On Wed, May 27, 2009 at 3:01 PM, Pierre GM wrote:
> Have you tried np.lib.io.genfromtxt ?
>
I didn't know about it, but it has the same problem as loadtxt:
In [5]: rdata.block[0,1] # incorrect
Out[5]: array([1, 1, 1])
In [6]: alt_data.block[0,1] # same thing, still wrong
Out[6]: a
On May 27, 2009, at 5:53 PM, Fernando Perez wrote:
> Howdy,
>
> I'm wondering if the code below illustrates a bug in loadtxt, or just
> a 'live with it' limitation.
Have you tried np.lib.io.genfromtxt ?
dt = dtype(dict(names=['name','x','y','block'],
formats=['S4',float,float,(
Howdy,
I'm wondering if the code below illustrates a bug in loadtxt, or just
a 'live with it' limitation.
I'm inlining it for ease of discussion, but the same code is attached
to ensure that anyone willing to look at this can just download and
run without pasting/whitespace issues.
The code is,
Matthew Koichi Grimes wrote:
> (Newbie alert.)
>
> I'm having trouble making a nested record array. I'm trying to work from
> the following example on the scipy.org examples page:
>
> >>> mydescriptor = dtype([('x', 'f4'),('y', 'f4'), # nested recarray
> ... ('nested', [('i', 'i2'),('j','i2')]
(Newbie alert.)
I'm having trouble making a nested record array. I'm trying to work from
the following example on the scipy.org examples page:
>>> mydescriptor = dtype([('x', 'f4'),('y', 'f4'), # nested recarray
... ('nested', [('i', 'i2'),('j','i2')])])
>>> myarr = array([(1.0, 2.0, (1,2)
13 matches
Mail list logo