> If they are in a list, then I would do something like
Apologies if it wasnt clear in my previous mail. The arrays are in a
lazy iterator, they are non-contiguous and there are several thousands
of them. I was hoping there was a way to get at a "+=" operator for
arrays to use in a reduce. Seems l
Derek Homeier wrote:
>
> Hi Chris,
>
> On 31 May 2011, at 13:56, cgraves wrote:
>
>> I've downloaded the latest numpy (1.6.0) and loadtxt has the ndmin
>> option,
>> however neither genfromtxt nor recfromtxt, which use loadtxt, have it.
>> Should they have inherited the option? Who can make
On Fri, Jun 3, 2011 at 1:46 PM, Neal Becker wrote:
> Can I arrange to reinterpret an array of complex of length N as an array of
> float of length 2N, and vice-versa? If so, how?
>
You can use the view() method (if the data is contiguous):
In [14]: z = array([1.0+1j, 2.0+3j, 4, 9j])
In [15]:
On Fri, Jun 3, 2011 at 13:46, Neal Becker wrote:
> Can I arrange to reinterpret an array of complex of length N as an array of
> float of length 2N, and vice-versa? If so, how?
[~]
|1> carr = np.arange(10, dtype=complex)
[~]
|2> carr
array([ 0.+0.j, 1.+0.j, 2.+0.j, 3.+0.j, 4.+0.j, 5.+0.j,
Can I arrange to reinterpret an array of complex of length N as an array of
float of length 2N, and vice-versa? If so, how?
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion
2011/6/3 Bruce Southey
> On 06/03/2011 10:33 AM, jonasr wrote:
> >
> >
> > Bruce Southey wrote:
> >> On 06/03/2011 09:33 AM, jonasr wrote:
> >>> thank you very much, works much nicer and faster in comparison to the
> >>> script
> >>> i wrote and used before ,
> >>> im not that much used to lambd
On 06/03/2011 10:33 AM, jonasr wrote:
>
>
> Bruce Southey wrote:
>> On 06/03/2011 09:33 AM, jonasr wrote:
>>> thank you very much, works much nicer and faster in comparison to the
>>> script
>>> i wrote and used before ,
>>> im not that much used to lambda forms but it seems quit usefull in
>>> si
On Wed, May 4, 2011 at 8:51 PM, Matthew Brett wrote:
> Hi,
>
> On Wed, May 4, 2011 at 1:23 PM, Ralf Gommers
> wrote:
> >
> >
> > On Wed, May 4, 2011 at 6:53 PM, Matthew Brett
> > wrote:
> >>
> >> Hi,
> >>
> >> I can imagine that this is low-priority, but I have just been enjoying
> >> pytox for
Bruce Southey wrote:
>
> On 06/03/2011 09:33 AM, jonasr wrote:
>> thank you very much, works much nicer and faster in comparison to the
>> script
>> i wrote and used before ,
>> im not that much used to lambda forms but it seems quit usefull in
>> situations like this
>>
>>
>> Olivier Delallea
On 06/03/2011 09:33 AM, jonasr wrote:
thank you very much, works much nicer and faster in comparison to the script
i wrote and used before ,
im not that much used to lambda forms but it seems quit usefull in
situations like this
Olivier Delalleau-2 wrote:
Here's an ugly one-liner:
numpy.genf
On Thu, Jun 2, 2011 at 7:36 PM, srean wrote:
> Bumping my question tentatively. I am fairly sure there is a good answer
> and for some reason it got overlooked.
>
> Regards
> srean
>
> -- Forwarded message --
> From: srean
> Date: Fri, May 27, 2011 at 10:36 AM
> Subject: Adding
thank you very much, works quit nice and faster in comparison to the script i
wrote and used before ,
im not that much used to lambda forms but it seems quit usefull in
situations like this
Olivier Delalleau-2 wrote:
>
> Here's an ugly one-liner:
>
> numpy.genfromtxt('data.txt', converters=d
I think the easiest is to use an intermediate string. If your file is test.txt,
In [22]: a = file('test.txt').read().replace(',','.')
In [23]: import StringIO
In [24]: b=genfromtxt(StringIO.StringIO(a))
In [25]: b
Out[25]:
array([[ 0.e+00, 1.2210e-03, 1.2210e-03,
0.00
Here's an ugly one-liner:
numpy.genfromtxt('data.txt', converters=dict([k, lambda x:
float(x.replace(',', '.'))] for k in
range(len(open('data.txt').readline().strip().split()
-=- Olivier
2011/6/3 jgrub
>
> Hello, im actually try to read in data with genfromtxt(),
> i want to read in numb
Den 02.06.2011 21:07, skrev Ralf Gommers:
>
> After search for multi-taper I found
> http://projects.scipy.org/scipy/ticket/608. Too bad no one has gotten
> around to review your contribution before, it sounds like a good
> addition for the scipy.signal module.
I once implemented DPSS tapers in
Hello, im actually try to read in data with genfromtxt(),
i want to read in numbers which are stored in a textfile like this:
0,000,0012210,0012210,001,278076
160,102539
4,00E-7 0,000,000,0024411,279297
On Thu, Jun 2, 2011 at 9:33 PM, Robert Kern wrote:
> On Thu, Jun 2, 2011 at 14:07, Ralf Gommers
> wrote:
> >
> > On Wed, Jun 1, 2011 at 5:45 PM, martin smith
> wrote:
> >>
> >> I have a bit of code that performs multi-taper power spectra using numpy
> >> and a C extension module. The C portion
17 matches
Mail list logo