you can create an array without changing the values of the allocated memory
by using numpy.empty() or numpy.ndarray()
this will allow you to create an array of any size without specifying the
contents beforehand.
I'm not sure what you mean by "empty", because any memory address will have
a val
Hi,
>> I'm trying to fix a bug in the scipy matlab loading routines, and this
>> requires me to somehow represent an empty structured array.
>>
>
> Do you need the struct to be empty (size is 0) or to have no fields ?
> What would you expect np.zeros((), dtype=np.dtype([])) to return, for
> exampl
Thanks for the quick reply. I'll try upgrading.
Best,
Ph.
On Monday 04 May 2009 04:21:29 pm Stéfan van der Walt wrote:
> Hi Philipp
>
> 2009/5/5 Philipp K. Janert :
> > If I see this correctly, my SciPy version
> > is 0.6.0; running on 64bit Suse 11.
>
> SciPy 0.6 is quite old
2009/5/5 David Bolme :
> I have been working on a open source face recognition demo tool called
> FaceL for the past few months. FaceL is a simple and fun face processing
> and labeling tool that labels faces in a live video from an iSight camera or
> webcam.
That's really neat -- I've always wa
Hi Philipp
2009/5/5 Philipp K. Janert :
> If I see this correctly, my SciPy version
> is 0.6.0; running on 64bit Suse 11.
SciPy 0.6 is quite old, and it is likely that the problem was fixed in
the mean time.
On SciPy 0.7 I see:
In [31]: u,s,v = linalg.svd(m)
In [32]: u
Out[32]:
array([[-0.7071
I have been working on a open source face recognition demo tool called
FaceL for the past few months. FaceL is a simple and fun face
processing and labeling tool that labels faces in a live video from an
iSight camera or webcam. It uses OpenCV for face detection, ASEF
correlation filters
The following code:
from scipy import *
from scipy import linalg
m = matrix( [ [1,1,0,0],
[1,1,0,0],
[0,0,1,1],
[0,0,1,1] ] )
u,s,v = linalg.svd( m )
fails with the following message:
Traceback (most recent call last):
File "boo.py", li
On Mon, May 4, 2009 at 2:02 PM, Ryan May wrote:
> On Mon, May 4, 2009 at 3:55 PM, David Warde-Farley
> wrote:
>>
>> Hi,
>>
>> Is there a simple way to compare each element of an object array to a
>> single object? objarray == None, for example, gives me a single
>> "False". I couldn't find any re
On Mon, May 4, 2009 at 3:55 PM, David Warde-Farley wrote:
> Hi,
>
> Is there a simple way to compare each element of an object array to a
> single object? objarray == None, for example, gives me a single
> "False". I couldn't find any reference to it in the documentation, but
> I'll admit, I wasn'
Hi,
Is there a simple way to compare each element of an object array to a
single object? objarray == None, for example, gives me a single
"False". I couldn't find any reference to it in the documentation, but
I'll admit, I wasn't quite sure where to look.
David
_
On Mon, May 4, 2009 at 4:00 PM, Chris Colbert wrote:
> i'll take a look at them over the next few days and see what i can hack out.
>
> Chris
>
> On Mon, May 4, 2009 at 3:18 PM, David Huard wrote:
>>
>>
>> On Mon, May 4, 2009 at 7:00 AM, wrote:
>>>
>>> On Mon, May 4, 2009 at 12:31 AM, Chris Colb
On Mon, May 4, 2009 at 3:06 PM, bruno Piguet wrote:
> Hello,
>
> I'm new to numpy, and considering using loadtxt() to read a data file.
>
> As a starter, I tried the example of the doc page (
> http://docs.scipy.org/doc/numpy/reference/generated/numpy.loadtxt.html) :
>
>
> >>> from StringIO i
Hello,
I'm new to numpy, and considering using loadtxt() to read a data file.
As a starter, I tried the example of the doc page (
http://docs.scipy.org/doc/numpy/reference/generated/numpy.loadtxt.html) :
>>> from StringIO import StringIO # StringIO behaves like a file object
>>> c = Strin
i'll take a look at them over the next few days and see what i can hack out.
Chris
On Mon, May 4, 2009 at 3:18 PM, David Huard wrote:
>
>
> On Mon, May 4, 2009 at 7:00 AM, wrote:
>
>> On Mon, May 4, 2009 at 12:31 AM, Chris Colbert
>> wrote:
>> > this actually sort of worked. Thanks for putti
On Mon, May 4, 2009 at 7:00 AM, wrote:
> On Mon, May 4, 2009 at 12:31 AM, Chris Colbert
> wrote:
> > this actually sort of worked. Thanks for putting me on the right track.
> >
> > Here is what I ended up with.
> >
> > this is what I ended up with:
> >
> > def hist3d(imgarray):
> > histarray
On Mon, May 4, 2009 at 10:59 AM, Nils Wagner
wrote:
> On Mon, 4 May 2009 10:52:59 -0600
> Charles R Harris wrote:
> > On Mon, May 4, 2009 at 10:48 AM, Nils Wagner
> > wrote:
> >
> >> Hi all,
> >>
> >> How can I define a stop criterion for an alternating
> >>series ?
> >>
> >> Any pointer would b
Neal Becker wrote:
> In [3]: n=-7
>
> In [4]: (np.linspace (0, 1023,1024).astype(np.uint64)*n).dtype
> Out[4]: dtype('float64')
what would you like (expect) to happen when you multiply an unsigned
type by a negative number?
-Chris
--
Christopher Barker, Ph.D.
Oceanographer
Emergency Respon
Zachary Pincus schrieb:
> scipy.ndimage.zoom (and related interpolation functions) would be a
> good bet -- different orders of interpolation are available, too,
> which can be useful.
Thanks a lot - exactly what I was looking for!
Kind regards,
Johannes
__
On Mon, 4 May 2009 10:52:59 -0600
Charles R Harris wrote:
> On Mon, May 4, 2009 at 10:48 AM, Nils Wagner
> wrote:
>
>> Hi all,
>>
>> How can I define a stop criterion for an alternating
>>series ?
>>
>> Any pointer would be appreciated.
>>
>
> Where does the series come from and what are you
On Mon, May 4, 2009 at 10:48 AM, Nils Wagner
wrote:
> Hi all,
>
> How can I define a stop criterion for an alternating series ?
>
> Any pointer would be appreciated.
>
Where does the series come from and what are you trying to do?
Chuck
___
Numpy-discu
Hi all,
How can I define a stop criterion for an alternating
series ?
Any pointer would be appreciated.
Nils
from numpy import loadtxt, arange
from pylab import plot, show
A = loadtxt('alternate.dat')
m = len(A)
x = arange(0,m)
plot(x,A)
show()
alternate.dat
Description: MPEG movie
___
Hi,All:
My first post! I am very excited to find out structured array (record array) in
Python. Since I do data manipulation every day, this is truly great. However, I
typically download data using pyodbc, the default output is a big list. So I am
wondering how to convert that big list into a
scipy.ndimage.zoom (and related interpolation functions) would be a
good bet -- different orders of interpolation are available, too,
which can be useful.
Zach
On May 4, 2009, at 11:40 AM, Johannes Bauer wrote:
> Hello list,
>
> is there a possibility to scale an array by interpolation,
>
Hello list,
is there a possibility to scale an array by interpolation,
automatically? For illustration a 1D-example would be an array of size
5, which is scaled to size 3:
before: [ 1, 2, 3, 4, 5 ]
1/1 2/3
1/3 1 1/3
2/3 1
after : [ 2.
Neal Becker wrote:
> Charles R Harris wrote:
>
>
>> On Fri, May 1, 2009 at 7:39 PM, Charles R Harris
>> wrote:
>>
>>
>>> On Fri, May 1, 2009 at 7:24 PM, Neal Becker wrote:
>>>
>>>
Charles R Harris wrote:
> On Fri, May 1, 2009 at 1:02 PM, Neal Becker
David Cournapeau wrote:
> On Mon, May 4, 2009 at 1:24 AM, Dag Sverre Seljebotn
> wrote:
>
>> David Cournapeau wrote:
>>
>>> On Fri, Apr 24, 2009 at 4:49 PM, Dag Sverre Seljebotn
>>>
One thing somebody *could* work on rather independently for some hours
is proper PEP 3118 s
2009/5/4 Neal Becker :
> Turns out that if A is an np.array and B is an np.array, then
> A[B] will do exactly what I wanted.
>
> Is this mentioned anywhere in the documentation?
http://docs.scipy.org/numpy/docs/numpy-docs/reference/arrays.indexing.rst/#arrays-indexing
Stéfan
_
Neal Becker wrote:
> Suggestion for efficient way to apply a table lookup to each element of an
> integer array?
>
> import numpy as np
> _cos = np.empty ((2**rom_in_bits,), dtype=int)
> _sin = np.empty ((2**rom_in_bits,), dtype=int)
> for address in xrange (2**12):
> _cos[address] = nint ((2
On Mon, May 4, 2009 at 12:31 AM, Chris Colbert wrote:
> this actually sort of worked. Thanks for putting me on the right track.
>
> Here is what I ended up with.
>
> this is what I ended up with:
>
> def hist3d(imgarray):
> histarray = N.zeros((16, 16, 16))
> temp = imgarray.copy()
> b
29 matches
Mail list logo