Congratulations for this :)
Matthieu
2008/4/21, David Cournapeau [EMAIL PROTECTED]:
Hi,
I am pleased to announce the 0.6.1 release of numscons. You can get
tarballs, eggs for python 2.4/2.5 and windows installers on launchpad:
https://launchpad.net/numpy.scons.support/0.6/0.6.1
I
2008/4/18, Robert Kern [EMAIL PROTECTED]:
On Fri, Apr 18, 2008 at 12:57 AM, Matthieu Brucher
[EMAIL PROTECTED] wrote:
I can help with packaging at least numpy with Visual Studio 2003 (well,
I
have to check the EULA if I'm allowed to do that !). For scipy, it is a
matter of Fortran
2008/4/18, Olivier Verdier [EMAIL PROTECTED]:
I certainly didn't mean that A==B should return a boolean!!
A==B should return an array of boolean as it does now. This is all
right.
*However* bool(A==B) should return a boolean, *not* raise an
exception. Why raise an exception? What is
Hi,
Ive implemented the classical MultiDimensional Scaling for the scikit learn
using both functions. Their behavior surprised me for big arrays (1 by
1, symmetric as it is a similarity matrix).
linalg.svd() raises a memory error because it tries to allocate a (700,)
array (in fact
Hi,
I'm trying to use raises with numpy, but when I call nosetests, it tells me
that make_decorator is not defined. And indeed, it is not defined or
imported in this file, but in nose/tools.py
Matthieu
--
French PhD student
Website : http://matthieu-brucher.developpez.com/
Blogs :
Thank you !
Matthieu
2008/4/17, Robert Kern [EMAIL PROTECTED]:
On Thu, Apr 17, 2008 at 9:07 AM, Matthieu Brucher
[EMAIL PROTECTED] wrote:
Hi,
I'm trying to use raises with numpy, but when I call nosetests, it tells
me
that make_decorator is not defined. And indeed, it is not defined
2008/4/18, David Cournapeau [EMAIL PROTECTED]:
Robert Kern wrote:
Well, if the official mingw team is committed to not supporting the
features that we need, then yes, absolutely. This appears to be the
case.
Well, this does not seem to work either with gcc 4.3* releases. I got
BTW, I stumbled on something strange with the nose framework. If you from
numpy.testing import * in a test file, the nose framework will try to test
the testing module by calling every test* method.
I just mention it there because I think I'm not the only one to do this for
set_package_path,
Sorry, I mixed up the version numbers :|
This means that you are on your own with compiling Python with VC++8 (2005).
Matthieu
2008/4/3, Christian Heimes [EMAIL PROTECTED]:
Matthieu Brucher schrieb:
Hi,
As I've said, you must start by compiling Python with VC++ 8, that means
using
The supporters of the commercial software told me that their software is
complied in VC++8.
So they have apparently compiled a python extension with VC++8 that
works? Are you sure that it works with the standard Windows Python
Build (Which version of Python, by the way?). From everything
2008/4/3, Chris Barker [EMAIL PROTECTED]:
Robert Kern wrote:
Just since that has been discussed a LOT, for years, I want to be clear:
Different versions of Microsoft's compiler use different libraries for
the standard C library. Some simple Python extension modules compiled
with a
Hi,
You can do this if you have Python compiled with VC++8 as well. If not, you
can't. Usually, numpy must be compiled with Visual Studio 7.1 or Mingw.
Matthieu
2008/4/2, yunzhi cheng [EMAIL PROTECTED]:
Hi Everybody,
I am a new user of Python.
I have to re-compile Numpy in VC++8.
I
to try to compile Numpy in VC++8.
It is a hard task for me to do that.
But I have to use Numpy in my python script since I want to use some
complicated algorithms.
Any help is appreciated.
Yunzhi Cheng
*Matthieu Brucher [EMAIL PROTECTED]* wrote:
Hi,
You can do this if you have Python
Hi,
The planet is no longer accessible. Anyone has the same issue ?
Matthieu
2008/1/1, Jarrod Millman [EMAIL PROTECTED]:
Hey,
I just wanted to announce that we now have a NumPy/SciPy blog
aggregator thanks to Gaël Varoquaux: http://planet.scipy.org/
Feel free to contact me if you have a
but the notation evectors[:3] will give me an ndarray of shape(3,6)
Am i missing something here?
Yes : evectors[:3] selects the first three lines, evectors[:,3] selects the
fourth column.
Matthieu
--
French PhD student
Website : http://matthieu-brucher.developpez.com/
Blogs :
2008/3/26, David Cournapeau [EMAIL PROTECTED]:
Gael Varoquaux wrote:
Except that very often when you do a bzr up you have to do a merge
because bzr makes obvious branching that is implicit with the svn model.
bzr does not branch implicitly, as far as I know, so I am not sure to
Hi,
Did you try diag() ? Or are you saying a symmetric matrix ?
Matthieu
2008/3/26, Pierre GM [EMAIL PROTECTED]:
All,
What's the quickest way to create a diagonal matrix ? I already have the
elements above the main diagonal. Of course, I could use loops:
m=5
z =
#now this creates 2 images.they are given in this page(http://
roytechdumps.blogspot.com/).The leasteigenface ie 'eigenface16.jpg'
is quite 'deteriorated' in appearance compared to the other.Is this
because of the
corresponding eigenvector containing least variations? can someone
explain
It was added as a compile-time #define on the SVN some days ago ;)
Matthieu
2008/3/24, Zachary Pincus [EMAIL PROTECTED]:
Hi all,
I looked at line 21902 of dlapack_lite.c, it is,
for (niter = iter; niter = 20; ++niter) {
Indeed the upper limit for iterations in the
It is a real problem in some communities like astronomers and images
processing people but the lack of documentation is the first one, that
is true.
Even in those communities, I think that a lot could be done at a higher
level, as what IPython1 does (tasks parallelism).
Matthieu
--
French
I find the example of sse rather enlightening: in theory, you should
expect a 100-300 % speed increase using sse, but even with pure C code
in a controlled manner, on one platform (linux + gcc), with varying,
recent CPU, the results are fundamentally different. So what would
happen in numpy,
If the performances are so bad, ok, forget about itbut it would be
sad because the next generation CPU will not be more powerfull, they
will only have more that one or two cores on the same chip.
I don't think this is the worst that will happen. The worst is what has been
seen for
(And I suspect that OpenMP is
smart enough to use single threads without locking when multiple
threads won't help. Certainly all the information is available to
OpenMP to make such decisions.)
Unfortunately, I don't think there is such a think. For instance the number
of threads used by MKL
Hi,
I don't understand why an unification would simplify stuff, it would make
everything so much more difficult :| Instead of dot, you would have a mult()
function to multiply element by element, the same for inv(), so much less
readable when using arrays when arrays are so much more general and
-20 kello 21:09 +0100, Matthieu Brucher kirjoitti:
Well, it is not completely solved. With the patch, the reference count
keeps on raising, but as it is for Python scalars, it is not a
problem, but the underlying problem in Py_DECREF will show up
eventually and it will need
2008/3/20, Joris De Ridder [EMAIL PROTECTED]:
Thanks Matthieu, for the interesting pointer.
My goal was to be able to use ctypes, though, to avoid having to do manual
memory management. Meanwhile, I was able to code something in C++ that may
be useful (see attachment). It (should) work as
2008/3/20, Joris De Ridder [EMAIL PROTECTED]:
You can use ctypes if and ony if the C++ object is only used in one
function call. You can't for instance create a C++ container with
ctypes, then in Python call some method and then delete the
container, because ctypes will destroy the data
Hi,
With latest SVN and Ubuntu 7.10 (Python 2.5.1, gcc 4.1.3, 32bits computer),
I don't have any error (BTW, I have 822 tests).
Matthieu
2008/3/20, Nils Wagner [EMAIL PROTECTED]:
Hi all,
I run numpy.test() with latest svn
numpy.test()
Numpy is installed in
Well, it is not completely solved. With the patch, the reference count keeps
on raising, but as it is for Python scalars, it is not a problem, but the
underlying problem in Py_DECREF will show up eventually and it will need to
be solved. But I'm afraid I'm not intimate enough with the mecanisms of
Hi,
On my blog, I spoke about the class we used. It is not derived from a Numpy
array, it is implemented in terms of a Numpy array (
http://matt.eifelle.com/item/5)
Matthieu
2008/3/19, Joris De Ridder [EMAIL PROTECTED]:
Hi,
I'm passing (possibly non-contiguous) numpy arrays (data + shape +
For the not blocker bugs, I think that #420 should be closed : float32 is
the the C float type, isn't it ?
Matthieu
2008/3/13, Jarrod Millman [EMAIL PROTECTED]:
Hello,
I am sure that everyone has noticed that 1.0.5 hasn't been released
yet. The main issue is that when I was getting ready
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
p3 is not compiled with the SSE2 instructions (it stands for Pentium 3 and
is needed for P3 and Athlon XP processors).
Matthieu
2008/3/11, mark [EMAIL PROTECTED]:
Hello - Anybody know the difference between
numpy-1.0.4.win32-py2.4.exe
and
numpy-1.0.4.win32-p3-py2.4.exe
Probably a simple
Hi,
If your images are 4x3, your eigenvector must be 12 long.
Matthieu
2008/2/28, [EMAIL PROTECTED] [EMAIL PROTECTED]:
i all
I am learning PCA method by reading up TurkPetland papers etc
while trying out PCA on a set of greyscale images using python, and
numpy I tried to create
and
then you must get the 4 eignevectors into your original space (I don't
remember the exact equations to do thge latter).
Matthieu
2008/2/28, [EMAIL PROTECTED] [EMAIL PROTECTED]:
On Feb 28, 1:27 pm, Matthieu Brucher wrote
If your images are 4x3, your eigenvector must be 12 long.
hi
Your matrix is almost singular, is badly conditionned,
Mathew, can you explain that..i didn't quite get it..
dn
The condition number is the ratio between the biggest eigenvalue and the
lowest one. In your case, it is 10E-16, so the precision of the double
numbers. That means that some
You should have such differences, that's strange. Are you sure you're using
the correct eigenvectors ?
Matthieu
2008/2/20, [EMAIL PROTECTED] [EMAIL PROTECTED]:
How are you using the values? How significant are the differences?
i am using these eigenvectors to do PCA on a set of
Good stuff. I noticed that the Launchpad page says:
I decided not to support dynamic linking against 3rd party dll.
Because of intrinsics windows limitations, it is impossible to do it
in a reliable way without putting too much burden on the maintainer.
I might note that I had problems
2008/2/19, David Cournapeau [EMAIL PROTECTED]:
Matthieu Brucher wrote:
If you use an installed ATLAS/MKL/... library, I don't know where is
the problem wit linking with them :|
Atlas is not a problem, because if you know how to build a dll for
ATLAS, you know how to handle environment
It is exactly the same problem, yes. Right now, my installer does not
modify the environment at all (like MKL or ACML, actually), and you have
to do it manually (add PATH, or put in system32).
Have you tried installing the DLLs to C:\Python2x or to the same
directory as the numpy .pyd? As
Now that you provide an installer for Atlas, it may become the same
problem as MKL, can't it ?
It is exactly the same problem, yes. Right now, my installer does not
modify the environment at all (like MKL or ACML, actually), and you have
to do it manually (add PATH, or put in system32).
Yes, it does, I think I tried it.
Strange that it worked for you, it didn't for me :|
Matthieu
--
French PhD student
Website : http://matthieu-brucher.developpez.com/
Blogs : http://matt.eifelle.com and http://blog.developpez.com/?blog=92
LinkedIn : http://www.linkedin.com/in/matthieubrucher
Hi,
The results are OK, they are very close. Your matrix is almost singular, is
badly conditionned, ... But the results are very close is you check them in
a relative way. 3.84433376e-03 or -6.835301757686207E-4 is the same compared
to 2.76980401e+13
Matthieu
2008/2/20, [EMAIL PROTECTED] [EMAIL
Hi,
numpy.ctypes uses ctypes to work, it consists of some additional utility
functions.
There was a discussion on this some time ago (SWIG, ctypes, ...) with David
(C.), Gaël and others.
Why translating some code to C ? Why not using f2py ?
Matthieu
2008/2/16, dmitrey [EMAIL PROTECTED]:
hi
Thanks for the reference :)
I should have asked in other terms : how does it compare to libsvm, which is
one of the most known packages for SVMs ?
Matthieu
2008/2/15, Davide Albanese [EMAIL PROTECTED]:
Dear Matthieu,
I don't know very well scikit.
The Svm is implemented by Sequential
OK, I'll try it then :)
Is there an access to the underlying cost function ? (this is mainly what I
need)
Matthieu
2008/2/15, Davide Albanese [EMAIL PROTECTED]:
I don't know very well libsvm too, the core of svm-mlpy is written in C
and was developed by Stefano Merler ([EMAIL PROTECTED]).
I
When Visual Studio 2008 will be used, there might be a way of using the
manifest files (that were created for a similar purpose).
For the moment, All I know is that you must put the dll in the
Windows/system32 folder or somewhere in the PATH.
Matthieu
2008/2/15, David Cournapeau [EMAIL
the svm class.
Inputs:
...
cost - for cost-sensitive classification [-1.0, 1.0]
Matthieu Brucher ha scritto:
OK, I'll try it then :)
Is there an access to the underlying cost function ? (this is mainly
what I need)
Matthieu
2008/2/15, Davide Albanese
Hi,
How does it compare to the elarn scikit, especially for the SVM part ? How
was it implemented ?
Matthieu
2008/2/14, Davide Albanese [EMAIL PROTECTED]:
*Machine Learning Py* (MLPY) is a *Python/NumPy* based package for
machine learning.
The package now includes:
* *Support Vector
Hi,
What type is pos-dimensions in your case ? It may be long (64bits long)
instead of the expected int (32bits) or something like that ?
Matthieu
2008/2/8, Yves Revaz [EMAIL PROTECTED]:
Dear list,
I'm using old numarray C api with numpy.
It seems that there is a bug when using the
This is what SWIG must be doing internally -- right ?!
Yes, it is with an additional typemap that checks the type of the data.
I don't think that it is a good idea for numpy to add such
multi-dispatching, it is not its job. There are a lot of ways to do it, and
besides it would be very
2008/2/4, Lou Pecora [EMAIL PROTECTED]:
Dear Mr. Fulco ,
This may not be exactly what you want to do, but I
would recommend using the C API and then calling your
C++ programs from there (where interface functions to
the C++ code is compiled in the extern C {, }
block. I will be doing
No problem for me (also a svn version) :
Python 2.5.1 (r251:54863, Oct 30 2007, 13:54:11)
[GCC 4.1.2 20070925 (Red Hat 4.1.2-33)] on linux2
import numpy
A = numpy.array(['a','aa','b'])
B = numpy.array(['d','e'])
A.searchsorted(B)
array([3, 3])
Matthieu
2008/1/31, lorenzo bolla [EMAIL
2008/1/25, dmitrey [EMAIL PROTECTED]:
Hi all,
I don't know much about what are these scons are, if it's something
essential (as it seems to be from amount of mailing list traffic) why
can't it be just merged to numpy, w/o making any additional branches?
Scons is a building system, like
Hi,
I think the main problem would be that some parts of Numpy are coded in C
and that they must be compiled as a shared library so that Python can access
them.
Matthieu
2008/1/22, Jussi Enkovaara [EMAIL PROTECTED]:
Hi,
I need to use numpy in an environment which does not support shared
One would naturally have to be very careful about which features to
use. In particular, don't use anything that throws, and I suppose one
would want to avoid having to link to the stdc++ library also. I don't
know if that is possible.
Avoiding linking to the stdc++ would be quite
In fact, the trunk should be tracked from all the branches, although
there will be the problem with merging the different branches (I did
not have many troubles with that, but I only tried with a few
differences) into the trunk. I don't think only one branch wants to be
up to date with
MKL does the multithreading on its own for level 3 BLAS instructions
(OpenMP). For ACML, the problem is that AMD does not provide a CBLAS
interface and is not interested in doing so. With ACML, the compilation
fails with the current Numpy, but hopefully with Scons it will work, at
least
2008/1/8, Ray Schumacher [EMAIL PROTECTED]:
At 04:27 AM 1/8/2008, you wrote:
4. Re: parallel numpy (by Brian Granger) - any info?
(Matthieu Brucher)
From: Matthieu Brucher [EMAIL PROTECTED]
MKL does the multithreading on its own for level 3 BLAS instructions
(OpenMP
This can also be true of C code unless you use compilers in the same
family.
There are also issues, but they are much simpler.
The C++ name mangling can be worked around.
name mangling is just the top of the iceberg. There are problems wrt to
static initialization, exception, etc...; ABI
This is no longer the case, sincerely. I use C++ compilers from
different vendors for some time, and I had almost no problem safe from
some template depth issues.
C++ ability is not so much a problem with recent compilers, I agree. But
not all platforms are or can use a recent C++
i,
I managed to reproduce your bugs on a FC6 box :
import numpy as n
n.sqrt(n.array([-1.0],dtype = n.complex192))
array([0.0+9.2747134e+492j], dtype=complex192)
n.sqrt(n.array([-1.0],dtype = n.complex128))
array([ 0.+1.j])
x=n.array([0.0+0.0j, 1.0+0.0j], dtype=n.complex192)
x
float16 is not defined in my version of Numpy :(
Matthieu
2008/1/7, Darren Dale [EMAIL PROTECTED]:
One of my collaborators would like to use 16bit float arrays. According to
http://www.scipy.org/Tentative_NumPy_Tutorial, and references to float16
in
numpy.core.numerictypes, it appears that
2008/1/7, dmitrey [EMAIL PROTECTED]:
The only one thing I'm very interested in for now - why the most
simplest matrix operations are not implemented to be parallel in numpy
yet (for several-CPU computers, like my AMD Athlon X2). First of all
it's related to matrix multiplication and devision,
Hi David,
How did you initialize svnmerge ?
Matthieu
2008/1/8, David Cournapeau [EMAIL PROTECTED]:
Fernando Perez wrote:
On Jan 7, 2008 10:41 PM, David Cournapeau [EMAIL PROTECTED]
wrote:
Hi,
for my work related on scons, I have a branch build_with_scons in
the numpy trunk,
2008/1/8, David Cournapeau [EMAIL PROTECTED]:
Matthieu Brucher wrote:
Hi David,
How did you initialize svnmerge ?
As said in the numpy wiki. More precisely:
- In a svn checkout of the trunk, do svn up to be up to date
- svn copy TRUNK MY_BRANCH
- use svnmerge init MY_BRANCH
2008/1/8, Matthieu Brucher [EMAIL PROTECTED]:
2008/1/8, David Cournapeau [EMAIL PROTECTED]:
Matthieu Brucher wrote:
Hi David,
How did you initialize svnmerge ?
As said in the numpy wiki. More precisely:
- In a svn checkout of the trunk, do svn up to be up to date
Oups, safe for the /trunk:1-2871 part. This should be deleted before
a commit to the trunk, I think.
Yes, that's what I (quite unclearly) meant: since revision numbers are
per- repository in svn, I don't understand the point of tracking trunk
revisions: I would think that tracking the last
*) After running the binary installer, apparently you're supposed to
go edit some .ini file to specify your username. It seems it will
work ok even if you don't set your username, but since it is
apparently highly recommended, the installer just should ask you as
part of the install
In the mean time, do you want to tell us more about how you use bzr with
svn. This seems like a good transitory option.
Once you installed bzr-svn, you can import the whole scikits trunk using
the svn-import command.
This works OK for Linux, but for Windows, the packages needed by bzr-svn
As the entry was added some days ago, some of us may have some DNS cache
issues, it should be fine in a couple of days ;)
Matthieu
2008/1/2, Scott Ransom [EMAIL PROTECTED]:
Hmmm. When I try to load:
http://planet.scipy.org/
I get: Unknown host planet.scipy.org
However,
Matthew B. will be working on converting SciPy tests to use nose per
Fernando's email. If you are familiar with nose and want to help,
please make sure to check with Matthew or Fernando first.
I must have missed Fernando's email because I can't find the references for
nose :(
What are its
Hi,
You can use ones as well if the array (not matrix) has the same values, or
the array function to create an array from a sequence, or matrix for matrix
and a sequence of sequences
a = n.ones((3,5)) * 9
b = n.array((1, 2, 3), (4, 5, 6), (6, 7, 8))
c = n.matrix((1, 2, 3), (4, 5, 6), (6, 7,
Hi,
Is there somewhere a equivalent to std::numerical_limits::epsilon, that
is, the greatest value such that 1. + epsilon is numerically equal to 1. ?
I saw something that could be related in oldnumeric, but nothing in numpy
itself.
Matthieu
--
French PhD student
Website :
2007/12/10, Alexander Michael [EMAIL PROTECTED]:
On Dec 10, 2007 6:48 AM, David Cournapeau [EMAIL PROTECTED]
wrote:
Hi,
Several people reported problems with numpy 1.0.4 (See #627 and
#628, but also other problems mentionned on the ML, which I cannot
find). They were all solved,
I had the same problem sooner today, someone told me the answer : use
numpy.info object ;)
Matthieu
2007/12/10, Hans Meine [EMAIL PROTECTED]:
Hi!
Is there a way to query the minimum and maximum values of the numpy
datatypes?
E.g. numpy.uint8.max == 255, numpy.uint8.min == 0 (these
This is great stuff by the way, consider me a scons convert.
I'm already convinced for some time. Now, we just need an egg Builder :|
Matthieu
--
French PhD student
Website : http://miles.developpez.com/
Blogs : http://matt.eifelle.com and http://blog.developpez.com/?blog=92
LinkedIn :
a does not seem to be an array, so it is not surprising that you need to
convert it to an array first.
Matthieu
2007/11/28, Sameer DCosta [EMAIL PROTECTED]:
I'm trying to convert a character array to a floating point array. I'm
using one of the recent svn builds. It is surprising that astype
Hi,
I submitted a ticket and then a patch for numpy.i
(http://projects.scipy.org/scipy/numpy/ticket/620). the problem is
that some typemaps use a C99 syntax whereas most C compiler still are
only C89 compliant (mainly Visual Studio).
Matthieu
--
French PhD student
Website :
Hi,
I'm trying to get numpy work with AMD's MKL. The problem is that they not
give a CBLAS interface, only the BLAS one.
Can the numpy distutils check the existence of the cblas interface somewhere
? For the moment, it checks something with BLAS (but no actual testing takes
place), but not CBLAS.
If what you want is to provide a view from your C++ matrix, this is
different. You must either :
- propose the array interface
- use a Python object inside your C++ matrix (this is to be done, I've a
basic example in my blog)
Of course : http://matt.eifelle.com/item/5
It's a basic
Of course : http://matt.eifelle.com/item/5
It's a basic version of the wrapper I use in my lab (pay attention to
the constructor for instance), I hope you will be able to do something
Thanks !
But this assumes that the data in my C++ library is stored in a
PyArrayObject ?
Yes, but if
What CPU do you have and which version of numpy did you get and where did
you get it from ?
Matthieu
2007/11/17, Jesus Torrecilla Pinero [EMAIL PROTECTED]:
I am using Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) under Windows
XP and converting a program from Numeric to Numpy. If I have
2007/11/17, Jesus Torrecilla Pinero [EMAIL PROTECTED]:
numpy-1.0.4.win32-py2.5 from sourceforge (precompiled binary)
CPU: AMD Athlon XP 2600+
2.09 GHz, 1.00 Gb RAM
The error report says:
AppName: pythonw.exe AppVer: 0.0.0.0 ModName: _dotblas.pyd
ModVer: 0.0.0.0
It's not a question of tuple, you made a tuple, but in each element, you put
the same array, so this behaviour is to be expected.
Matthieu
2007/11/15, George Nurser [EMAIL PROTECTED]:
I tried the (as I thought) nice compact form
In [60]: a,b = (zeros((2,)),)*2
But...
In [61]: b[0] = 2
Nobody can answer this ?
Matthieu
2007/11/4, Matthieu Brucher [EMAIL PROTECTED]:
Hi,
I'm trying to use PyArray_CastToType(), but according to the book, there
are two arguments, a PyArrayObject* and a PyArrayDescr*, but according to
the header file, there are three arguments, an additional
Hi,
I have an object that exposes an array interface. I want to modify the data
it contains, but using numpy.array(myObject) seems to copy the data and thus
my object is not modified. Am I mistaken or did I make a mistake in my array
interface ?
Matthieu
--
French PhD student
Website :
2007/11/12, Albert Strasheim [EMAIL PROTECTED]:
Hello,
Have you considered looking at the source for PyArray_CastToType in
core/src/arrayobject.c?
Cheers,
Albert
Well no :( I didn't know where to look (and this should be fixed in the book
as well...)
Matthieu
--
French PhD student
2007/11/12, Christopher Barker [EMAIL PROTECTED]:
Matthieu Brucher wrote:
I have an object that exposes an array interface. I want to modify the
data it contains, but using numpy.array(myObject) seems to copy the data
and thus my object is not modified. Am I mistaken or did I make
No, it looks like NPY_ALLOW_THREADS is not defined: this pre processor
symbol is defined in config.h, which is auto generated by the setup.py
from numpy.core. Can you paste its content (should be somewhere in
your build directory).
David
Here it is :
/* #define SIZEOF_SHORT 2 */
/*
I don't understand. I'm thinking of most math functions in the
C-library. In C a boolean is just an integer of 0 or 1 (quasi, by
definition).
Could you explain what you mean ?
In C++, bool is a new type that has two values, true and false. If you add
true and true, it is still true, and
-type array ?
(Without making a differently-typed copy of course ...)
Thanks,
Sebastian
PS: I'm not using the C++ std library.
On Nov 7, 2007 2:54 PM, Matthieu Brucher [EMAIL PROTECTED]
wrote:
Hi,
No, a bool is not an int32. Try just sizeof(bool) to be sure (on my box,
it's one
Hi,
I'm trying to use PyArray_CastToType(), but according to the book, there are
two arguments, a PyArrayObject* and a PyArrayDescr*, but according to the
header file, there are three arguments, an additional int. Does someone know
its use ?
Matthieu
--
French PhD student
Website :
Sorry : http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/
It has some publications written about the design it uses (iterators and
such), really well done.
Matthieu
2007/11/2, Bill Baxter [EMAIL PROTECTED]:
On Nov 2, 2007 3:50 PM, Matthieu Brucher [EMAIL PROTECTED]
wrote:
You can
Hi,
The problem will arise for every package, not only numpy, so Apple fixing
this is the best solution IMHO.
Matthieu
2007/11/1, Brian Granger [EMAIL PROTECTED]:
Hi,
It turns out that Leopard includes numpy. But it is an older version
that won't detect the version string of gfortran
But if I have the coordinates of the points in an array, I have to
reshape it
and then convert it into a list. Or convert it into a list and then
convert it
to a tuple. I know that advanced indexing is useful, but here it is not
coherent. tuples and lists should have the same result on
In this case the constructor
tuple(arr)
should work just fine.
Sorry, I didn't know it could work (shame on me I should have tested).
--
French PhD student
Website : http://miles.developpez.com/
Blogs : http://matt.eifelle.com and http://blog.developpez.com/?blog=92
Hi,
I'm trying to get an item in an array when I only have another array giving
the position.
For instance:
c = numpy.arange(0., 3*4*5).reshape((3,4,5))
c***(numpy.array((2,3), dtype=int))
[55, 56, 57, 58, 59]
I'm trying to figure what to put between c and ((2,3)). I supposed that the
take
Little correction, only c[(2,3)] gives me what I expect, not c[[2,3]],
which
is even stranger.
c[(2,3)] is the same as c[2,3] and obviously works as you expected.
Well, this is not indicated in the documentation.
c[[2,3]] is refered to as 'advanced indexing' in the numpy book.
It
Which version Python are you using ?
Matthieu
2007/10/26, Robert Crida [EMAIL PROTECTED]:
Hi all
I recently posted about a memory leak in numpy and failed to mention the
version. The leak manifests itself in numpy-1.0.3.1 but is not present in
numpy-1.0.2
The following code reproduces
201 - 300 of 373 matches
Mail list logo