hi
while trying to make an eigenface image from a numpy array of floats i
tried this
from numpy import array
import Image
imagesize=(200,200)
def makeimage(inputarray,imagename):
inputarray.shape=(-1,)
newimg=Image.new('L', imagesize)
newimg.putdata(inputarray)
newimg.save
In the process of addressing tickets for the next release, Charles Harris
and I made some changes to the internals of the average function which also
affects which input are accepted as valid.
According to the current documentation, weights can either be 1D or any
shape that can be broadcasted to
Hi Pierre
Thanks for your fix for #703. Unfortunately, it seems to have broken
some tests:
http://buildbot.scipy.org/builders/Windows_XP_x86_MSVC/builds/276/steps/shell_2/logs/stdio
Regards
Stéfan
On Mon, Mar 17, 2008 at 7:26 PM, Eric Firing <[EMAIL PROTECTED]> wrote:
> Pierre,
>
> I just tri
On Tue, 18 Mar 2008 12:48:31 -0700 (PDT)
Lou Pecora <[EMAIL PROTECTED]> wrote:
> I have run into a failure of complex SVD in numpy
> (version='1.0.3.1'). The error is:
>
> File
> "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/numpy/linalg/linalg.py",
> line 767,
Hi,
I think it could happen, the search for an eignevalue is an iterative
process that can diverge sometimes. All SVD implementations have this hard
coded-limitation, so that the biorthogonalization can finish in finite time.
What is the determinant of your matrix ?
Matthieu
2008/3/18, Lou Pecor
I have run into a failure of complex SVD in numpy
(version='1.0.3.1'). The error is:
File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/numpy/linalg/linalg.py",
line 767, in svd
raise LinAlgError, 'SVD did not converge'
numpy.linalg.linalg.LinAlgError: SVD d
On Tue, Mar 18, 2008 at 2:18 PM, Robert Kern <[EMAIL PROTECTED]> wrote:
>
> On Tue, Mar 18, 2008 at 9:48 AM, <[EMAIL PROTECTED]> wrote:
> > Hi all,
> >
> > How do I handle numpy record arrays (heterogenous dtype) with ctypes?
> > The python side is reasonably obvious to me, but I'm confused
On Tue, Mar 18, 2008 at 9:48 AM, <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> How do I handle numpy record arrays (heterogenous dtype) with ctypes?
> The python side is reasonably obvious to me, but I'm confused about
> how to declare my C function's signature; whether I need to include
> the nump
On Tue, Mar 18, 2008 at 4:25 AM, Chris Withers <[EMAIL PROTECTED]> wrote:
> Robert Kern wrote:
> > Appending to a list is almost always better than growing an array by
> > concatenation. If you have a real need for speed, though, there are a
> > few tricks you can do at the expense of complexity
Alexander Michael wrote:
> Be default (if I understand correctly) the passing a regular array to
> MaskedArray will not copy it, so it less redundant than it may at
> first appear. The MaskedArray provides as masked *view* of the
> underlying array data you give it.
Cool, that was exactly what I w
Alan G Isaac wrote:
> Again:
> http://www.scipy.org/Numpy_Example_List_With_Doc
>
> Really, as a new NumPy user you should just keep
> this page open in your browser.
Point well made, it's a shame that summary doesn't form part of the book...
> Also, help(N.sum), of course.
Ah cool. I think I g
On Tue, 18 Mar 2008, Chris Withers apparently wrote:
> Where are the docs for sum?
Again:
http://www.scipy.org/Numpy_Example_List_With_Doc
Really, as a new NumPy user you should just keep
this page open in your browser.
Also, help(N.sum), of course.
Cheers,
Alan Isaac
__
Manuel Metz wrote:
> Hm, in this case you can do it like this:
>
> numpy.sum(numpy.array([numpy.sum(v) for k,v in data.items()]))
maybe:
numpy.num(data.values(),axis=0)
...would also work?
I can't actually use that though as the reason I need to do this is part
of building stacked bar charts
Chris Withers wrote:
> Alan G Isaac wrote:
>> On Tue, 18 Mar 2008, Chris Withers apparently wrote:
>>> Say I have an aribtary number of arrays:
>>> arrays = [array([1,2,3]),array([4,5,6]),array([7,8,9])]
>>> How can I sum these all together?
>> Try N.sum(arrays,axis=0).
>
> I assume N here is:
>
Manuel Metz wrote:
> Chris Withers wrote:
>> Hi All,
>>
>> Say I have an aribtary number of arrays:
>>
>> arrays = [array([1,2,3]),array([4,5,6]),array([7,8,9])]
>>
>> How can I sum these all together?
>>
>> My only solution so far is this:
>>
>> sum = arrays[0]
>> for a in arrays[1:]:
>>sum +=
use the "axis" argument in sum.
L.
On Tue, Mar 18, 2008 at 4:27 PM, Chris Withers <[EMAIL PROTECTED]>
wrote:
> Keith Goodman wrote:
> >>> sum(x)
> >
> > matrix([[ 1.15063313],
> > [ 0.8841396 ],
> > [ 1.7370669 ]])
>
> When these are arrays, I just get a single number sum back...
Chris Withers wrote:
> Hi All,
>
> Say I have an aribtary number of arrays:
>
> arrays = [array([1,2,3]),array([4,5,6]),array([7,8,9])]
>
> How can I sum these all together?
>
> My only solution so far is this:
>
> sum = arrays[0]
> for a in arrays[1:]:
>sum += a
>
> ...which is ugly :-S
Alan G Isaac wrote:
> On Tue, 18 Mar 2008, Chris Withers apparently wrote:
>> Say I have an aribtary number of arrays:
>> arrays = [array([1,2,3]),array([4,5,6]),array([7,8,9])]
>> How can I sum these all together?
>
> Try N.sum(arrays,axis=0).
I assume N here is:
import numpy as N?
Yep, it i
Keith Goodman wrote:
>>> sum(x)
>
> matrix([[ 1.15063313],
> [ 0.8841396 ],
> [ 1.7370669 ]])
When these are arrays, I just get a single number sum back...
Chris
--
Simplistix - Content Management, Zope & Python Consulting
- http://www.simplistix.co.uk
_
On Tue, Mar 18, 2008 at 9:12 AM, Chris Withers <[EMAIL PROTECTED]>
wrote:
> Hi All,
>
> Say I have an aribtary number of arrays:
>
> arrays = [array([1,2,3]),array([4,5,6]),array([7,8,9])]
>
> How can I sum these all together?
>
> My only solution so far is this:
>
> sum = arrays[0]
> for a in arr
On Tue, Mar 18, 2008 at 8:12 AM, Chris Withers <[EMAIL PROTECTED]> wrote:
> Hi All,
>
> Say I have an aribtary number of arrays:
>
> arrays = [array([1,2,3]),array([4,5,6]),array([7,8,9])]
>
> How can I sum these all together?
>
> My only solution so far is this:
>
> sum = arrays[0]
> for a i
On Tue, 18 Mar 2008, Chris Withers apparently wrote:
> Say I have an aribtary number of arrays:
> arrays = [array([1,2,3]),array([4,5,6]),array([7,8,9])]
> How can I sum these all together?
Try N.sum(arrays,axis=0).
But must they be in a list?
An array of arrays (i.e., 2d array) is easy to sum.
Hi All,
Say I have an aribtary number of arrays:
arrays = [array([1,2,3]),array([4,5,6]),array([7,8,9])]
How can I sum these all together?
My only solution so far is this:
sum = arrays[0]
for a in arrays[1:]:
sum += a
...which is ugly :-S
cheers,
Chris
--
Simplistix - Content Manageme
Hi all,
How do I handle numpy record arrays (heterogenous dtype) with ctypes?
The python side is reasonably obvious to me, but I'm confused about
how to declare my C function's signature; whether I need to include
the numpy array interface header file or not... etc...
It's not obvious to me how a
On Tue, Mar 18, 2008 at 5:27 AM, Chris Withers <[EMAIL PROTECTED]> wrote:
> Travis E. Oliphant wrote:
> > Generally, arrays are not efficiently re-sized. It is best to
> > pre-allocate, or simply create a list by appending and then convert to
> > an array after the fact as you have done.
>
> T
On Mon, Mar 17, 2008 at 4:55 PM, Robert Kern <[EMAIL PROTECTED]> wrote:
> On Mon, Mar 17, 2008 at 3:44 PM, Alexander Michael <[EMAIL PROTECTED]> wrote:
> > Is there a way to view an N-dimensional array with a *homogeneous*
> > record dtype as an array of N+1 dimensions? An example will make it
>
I have two questions about numpy.float64 :
- why do numpy.float64 have a tolist method, whereas standard
python float hasn't ?
- why does it not return list ?
This seems to be the source of some bugs ( like this one, with
scipy.interpolate.spalde :
http://groups.google.com/group/scipy-use
Travis E. Oliphant wrote:
> Generally, arrays are not efficiently re-sized. It is best to
> pre-allocate, or simply create a list by appending and then convert to
> an array after the fact as you have done.
True, although that feels like iterating over the data twice for no
reason, which feels
Robert Kern wrote:
> Appending to a list is almost always better than growing an array by
> concatenation. If you have a real need for speed, though, there are a
> few tricks you can do at the expense of complexity.
I don't for this project but I might in future, where can I read about this?
chee
29 matches
Mail list logo