Re: [Numpy-discussion] Convert array type

2007-10-08 Thread Robert Kern
, then the string is interpreted as binary data. If it is not empty, then the string is interpreted as ASCII. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth

Re: [Numpy-discussion] fortran 90 compiler problem

2007-10-10 Thread Robert Kern
and the command that you used to obtain it. The one you show, for numpy, succeeded. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco

Re: [Numpy-discussion] fortran 90 compiler problem

2007-10-10 Thread Robert Kern
=gnu95 -c -m hello hello.f90 -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco ___ Numpy-discussion

Re: [Numpy-discussion] fortran 90 compiler problem

2007-10-10 Thread Robert Kern
Charles R Harris wrote: On 10/10/07, *Robert Kern* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Hello, I'm using the last svn version of numpy (. I tried the solution found on the mail list

Re: [Numpy-discussion] appending extra items to arrays

2007-10-10 Thread Robert Kern
array thereby negating the need for the list, as the array object doesn't seem to have an append() method? Appending to a list then converting the list to an array is the most straightforward way to do it. If the performance of this isn't a problem, I recommend leaving it alone. -- Robert Kern I

Re: [Numpy-discussion] appending extra items to arrays

2007-10-10 Thread Robert Kern
Anne Archibald wrote: On 11/10/2007, Robert Kern [EMAIL PROTECTED] wrote: Appending to a list then converting the list to an array is the most straightforward way to do it. If the performance of this isn't a problem, I recommend leaving it alone. Just a speculation: Python strings have

Re: [Numpy-discussion] For review: first milestone of scons support in numpy

2007-10-11 Thread Robert Kern
. For example, in debian one has to install python-dev separately from python. You'd still need python-dev(el) for the headers if not distutils. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret

Re: [Numpy-discussion] .bytes

2007-10-15 Thread Robert Kern
' objects A more straightforward way to get the itemsize is this: In [17]: dtype(float64).itemsize Out[17]: 8 -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying

Re: [Numpy-discussion] A basic question on the dot function

2007-10-16 Thread Robert Kern
of the second argument. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco ___ Numpy-discussion mailing

Re: [Numpy-discussion] Sum of the product of three or more arrays

2007-10-18 Thread Robert Kern
Geoffrey Zhu wrote: Hi All, Given three vectors of the same lengths, X, Y, and Z, I am looking for an efficient way to calculate the following: sum(x[i]*y[i]*z[i], for i=1..n ) (x*y*z).sum() -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma

Re: [Numpy-discussion] vectorizing loops

2007-10-26 Thread Robert Kern
)) into a binary ufunc f(x, y) with an ignored y, then you could call f.accumulate(z). However, if that ufunc is not implemented in C, there's not much point. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt

Re: [Numpy-discussion] matrix problem: float to matrix power

2007-10-31 Thread Robert Kern
Charles R Harris wrote: On 10/31/07, Robert Kern [EMAIL PROTECTED] wrote: Charles R Harris wrote: On 10/31/07, Alan G Isaac [EMAIL PROTECTED] wrote: 1.0**numpy.array([1,2,3]) array([ 1., 1., 1.]) 1.0**numpy.mat([1,2,3]) Traceback (most recent call last): File stdin, line 1, in module

Re: [Numpy-discussion] Problem with numpy on Leopard

2007-11-01 Thread Robert Kern
recommend using the Python.framework in /System for anything except for distributing lightweight .apps. In that case, you can control your sys.path very well. For regular work, use the binary from www.python.org. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma

Re: [Numpy-discussion] Assessing the use of packages

2007-11-06 Thread Robert Kern
cannot determine. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco ___ Numpy-discussion mailing

Re: [Numpy-discussion] numpy 1.04 numpy.test() hang

2007-11-08 Thread Robert Kern
is going on? No. Run numpy.test(verbosity=2) so it will print out each test name before running the test. Then we might have some idea about where the hang is coming from. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own

Re: [Numpy-discussion] weibull distribution has only one parameter?

2007-11-12 Thread Robert Kern
when I have the lambda and k parameters? lambda * numpy.random.weibull(k) -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco

Re: [Numpy-discussion] weibull distribution has only one parameter?

2007-11-12 Thread Robert Kern
a) { return pow(rk_standard_exponential(state), 1./a); } Like Ryan says, multiplying a random deviate by a number is different from multiplying the PDF by a number. Multiplying the random deviate by lambda is equivalent to transforming pdf(x) to pdf(x/lambda) not lambda*pdf(x). -- Robert Kern

Re: [Numpy-discussion] Proposing Ubiquity

2007-11-13 Thread Robert Kern
examples of what you would like to see? Preferably, can you write some working code that demonstrates this feature? -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying

Re: [Numpy-discussion] Should array iterate over a set?

2007-11-17 Thread Robert Kern
for constructing an array from an iterable. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco ___ Numpy

Re: [Numpy-discussion] Building NumPy on Mac OS X without Apple GCC

2007-11-28 Thread Robert Kern
does not add these flags; Python does. Python extensions should be built with the same compiler that Python itself was built with. If you are using the binary distribution from www.python.org, you should use Apple's gcc, not a different one. -- Robert Kern I have come to believe that the whole

Re: [Numpy-discussion] Building NumPy on Mac OS X without Apple GCC

2007-11-28 Thread Robert Kern
Joshua Lippai wrote: Thanks for the reply. Well, I built my Python stuff, including NumPy previously, before I changed to the higher GCC version. Do you know if there's an option I can toggle that will specify Apple's GCC to be used? $ CC=/usr/bin/gcc python setup.py build -- Robert Kern

Re: [Numpy-discussion] display numpy array as image

2007-11-29 Thread Robert Kern
(27442576) You might want to use the new ctypes-based OpenGL 3.0+ package. It has numpy support a bit more directly. You can use Pyglet for its windowing and all of the other surrounding infrastructure and use OpenGL directly for the drawing. -- Robert Kern I have come to believe that the whole

Re: [Numpy-discussion] scipy binary for macosx tiger on ppc

2007-11-30 Thread Robert Kern
$ python setup.py config_fc --fcompiler=gnu95 --arch=-arch i386 -arch ppc build_ext -L ~/staticlibs/ build -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying

Re: [Numpy-discussion] scipy binary for macosx tiger on ppc

2007-11-30 Thread Robert Kern
Christopher Barker wrote: Robert Kern wrote: Official binaries intended for distribution from scipy.org or scipy.sf.net should not be linked against FFTW or UMFPACK since they are GPLed. Does that apply to binaries put up on pythonmac.org? It would be nice to have a complete version

Re: [Numpy-discussion] random.hypergeometric bug

2007-12-02 Thread Robert Kern
Out[40]: 3.0 But the sample mean is way to small: In [41]: mean(x) Out[41]: 0.996 Fixed in r4527. My original source for the algorithm was incorrect, it seems. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad

Re: [Numpy-discussion] scipy.scons branch: building numpy and scipy with scons

2007-12-04 Thread Robert Kern
. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco ___ Numpy-discussion mailing list Numpy

Re: [Numpy-discussion] scipy.scons branch: building numpy and scipy with scons

2007-12-04 Thread Robert Kern
Fernando Perez wrote: On Dec 4, 2007 12:27 PM, Robert Kern [EMAIL PROTECTED] wrote: user-friendly. Another option is to have our Fortran compiler knowledge-base separable from the rest of the package. scons could try to import them from, say, numpy_fcompilers first and then look inside

Re: [Numpy-discussion] scipy.scons branch: building numpy and scipy with scons

2007-12-04 Thread Robert Kern
Fernando Perez wrote: On Dec 4, 2007 1:24 PM, Robert Kern [EMAIL PROTECTED] wrote: Fernando Perez wrote: Is this something that really needs to be a code package? Why can't this knowledge (or at least the easily overridable part of it) be packaged in one or more .conf/.ini plaintext files

Re: [Numpy-discussion] scipy.scons branch: building numpy and scipy with scons

2007-12-04 Thread Robert Kern
for version 10 on OS X. Would I copy that file to scons/tool/ and make my edits there? Do I then add 'ifort' to the list in scons/core/default.py? -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret

Re: [Numpy-discussion] scipy.scons branch: building numpy and scipy with scons

2007-12-04 Thread Robert Kern
a problem. We could just update it on its own release schedule. People would probably be more willing to use the development versions of it, too, instead of having to also buy into the development version of their array package as well. -- Robert Kern I have come to believe that the whole world

Re: [Numpy-discussion] scipy.scons branch: building numpy and scipy with scons

2007-12-04 Thread Robert Kern
David Cournapeau wrote: Robert Kern wrote: David Cournapeau wrote: - I have not yet tweaked fortran compiler configurations for optimizations except for gnu compilers Can you give us a brief overview about how to do this? For example, the Intel Fortran compiler's SHLINKFLAGS in scons

Re: [Numpy-discussion] scipy.scons branch: building numpy and scipy with scons

2007-12-04 Thread Robert Kern
David Cournapeau wrote: On Dec 5, 2007 1:14 PM, Robert Kern [EMAIL PROTECTED] wrote: This, too, is a workaround for the less-than-desirable situation of having numpy's sizable build infrastructure bundled with the numpy package itself. If this stuff were an entirely separate package focused

Re: [Numpy-discussion] scipy.scons branch: building numpy and scipy with scons

2007-12-04 Thread Robert Kern
David Cournapeau wrote: On Dec 5, 2007 1:19 PM, Robert Kern [EMAIL PROTECTED] wrote: David Cournapeau wrote: Robert Kern wrote: David Cournapeau wrote: - I have not yet tweaked fortran compiler configurations for optimizations except for gnu compilers Can you give us a brief overview

Re: [Numpy-discussion] scipy.scons branch: building numpy and scipy with scons

2007-12-04 Thread Robert Kern
David Cournapeau wrote: On Dec 5, 2007 3:07 PM, Robert Kern [EMAIL PROTECTED] wrote: I don't see how that's relevant to the problem I raised. Supporting Fortran in the standard library would make the problem even worse. distutils is certainly not broken because it doesn't support Fortran

Re: [Numpy-discussion] site down...

2007-12-05 Thread Robert Kern
Fernando Perez wrote: The whole scipy.org site seems down. Is it just on my end? No. Our new IT guy, Ryan Earl jre at enthought.com, is on the case. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt

Re: [Numpy-discussion] site down...

2007-12-05 Thread Robert Kern
Steven H. Rogers wrote: Fernando Perez wrote: The whole scipy.org site seems down. Is it just on my end? Works for me, though it seems pretty slow. The system has been restarted. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made

Re: [Numpy-discussion] multinomial question

2007-12-05 Thread Robert Kern
have to dive deeper to figure out what is going on. This makes me grumpy. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco

Re: [Numpy-discussion] multinomial question

2007-12-05 Thread Robert Kern
://www.unc.edu/~gfish/fcmc.html is also wrong. SVN now has a bound such that CDF(bound) is within 1e-16 (or so) of 1.0. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had

Re: [Numpy-discussion] Max on Complex Array

2007-12-06 Thread Robert Kern
]: c.sort() In [22]: c Out[22]: array([ 0.+0.52885086j, 0.+0.68448275j, 1.+0.07268317j, 1.+0.34576644j, 1.+0.97849291j, 3.+0.22114928j, 3.+0.91550523j, 4.+0.50667105j, 4.+0.65409519j, 4.+0.97286048j]) -- Robert Kern I have come to believe that the whole world is an enigma

Re: [Numpy-discussion] Changing the distributed binary for numpy 1.0.4 for windows ?

2007-12-10 Thread Robert Kern
accept a slow BLAS for an official binary that won't segfault anywhere. We can look for a faster BLAS later. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying

Re: [Numpy-discussion] Traceback on divide by zero error

2007-12-13 Thread Robert Kern
': 'print', 'under': 'ignore'} In [6]: ones(10) / zeros(10) Out[6]: array([ Inf, Inf, Inf, Inf, Inf, Inf, Inf, Inf, Inf, Inf]) -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though

Re: [Numpy-discussion] Overloading sqrt(5.5)*myvector

2007-12-26 Thread Robert Kern
I'm happy to check the list and give answers that are at the front of my head, deeper answers that require exploration or experimentation are beyond my available time. I'm sure others are in a similar situation. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless

Re: [Numpy-discussion] [SciPy-dev] Doc-day

2007-12-28 Thread Robert Kern
that exact test and not run the rest of the test suite. * Output capture. Tests can print out anything they like to be more informative, but they won't appear unless if the test fails. More thoroughly: http://somethingaboutorange.com/mrl/projects/nose/ -- Robert Kern I have come to believe

Re: [Numpy-discussion] unexpected behavior with allclose( scalar, empty array)

2008-01-03 Thread Robert Kern
) assert np.allclose(a,b) Is this expected behavior of numpy or is this a bug I should report? Bug, I think. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying

Re: [Numpy-discussion] unexpected behavior with allclose( scalar, empty array)

2008-01-03 Thread Robert Kern
, previously. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco ___ Numpy-discussion mailing

Re: [Numpy-discussion] Numpy code coverage

2008-01-03 Thread Robert Kern
never encountered any documents about checking C code coverage of Python extension modules. It is possible that the standard tools for C code coverage (e.g. gcov) would work fine with some finagling. If you try this, I would love to hear what you did. -- Robert Kern I have come to believe

Re: [Numpy-discussion] weird indexing

2008-01-04 Thread Robert Kern
] actually return A[0]. Or something. Any thoughts? The best way would depend on what you want to do with it. Why do you need this? -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though

Re: [Numpy-discussion] PyArray_FromAny does not accept a generator?

2008-01-04 Thread Robert Kern
to make (only) a rank-1 array and thus sidestep a big chunk of the magical interpretation. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco

Re: [Numpy-discussion] Nasty bug using pre-initialized arrays

2008-01-04 Thread Robert Kern
number of situations. We will not allow it to be done implicitly. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco

Re: [Numpy-discussion] Moving away from svn ?

2008-01-04 Thread Robert Kern
(like the availability of Windows shell integration, etc.) instead of vague inferences. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto

Re: [Numpy-discussion] Nasty bug using pre-initialized arrays

2008-01-04 Thread Robert Kern
. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco ___ Numpy-discussion mailing list Numpy

Re: [Numpy-discussion] Moving away from svn ?

2008-01-04 Thread Robert Kern
that SVN 1.5 will be tracking such information. But that release is a long ways off. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco

Re: [Numpy-discussion] how to create an array of objects that are sequences?

2008-01-04 Thread Robert Kern
it's still ambiguous with the depth information provided? -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco

Re: [Numpy-discussion] Moving away from svn ?

2008-01-06 Thread Robert Kern
. We already do it for me: http://www.enthought.com/~rkern/cgi-bin/hgwebdir.cgi The remaining thing we would have to support is the Trac integration. While not as trivial as simply hosting the repositories, it's not a very large commitment. -- Robert Kern I have come to believe that the whole

Re: [Numpy-discussion] how to create an array of objects that are sequences?

2008-01-06 Thread Robert Kern
Christopher Barker wrote: Robert Kern wrote: Chris Barker wrote: What if your objects were nested sequences, and you wanted to partly flatten them -- which would you flatten? I'm pretty sure that that is exactly the ambiguity that the depth option resolves. Can you give me an example where

Re: [Numpy-discussion] Moving away from svn ?

2008-01-06 Thread Robert Kern
. SVN does not track this information. Tools like svnmerge.py track some of this information at the expense of some added clumsiness. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though

Re: [Numpy-discussion] Moving away from svn ?

2008-01-06 Thread Robert Kern
. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco ___ Numpy-discussion mailing list Numpy

Re: [Numpy-discussion] Moving away from svn ?

2008-01-06 Thread Robert Kern
Bill Baxter wrote: On Jan 6, 2008 6:38 PM, Robert Kern [EMAIL PROTECTED] wrote: Bill Baxter wrote: http://www.selenic.com/mercurial/wiki/index.cgi/MergeProgram This is a bit puzzling. I understand better merging isn't the only reason to choose DVCS, but the above page basically says

Re: [Numpy-discussion] parallel numpy (by Brian Granger) - any info?

2008-01-07 Thread Robert Kern
. It is possible that this comes from the particular implementation, rather than being intrinsic to the problem. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth

Re: [Numpy-discussion] Using svnmerge on numpy: am I missing something ?

2008-01-08 Thread Robert Kern
. It belongs in each of the branches independently. For some reason, it got merged into the trunk from one of the branches by mistake, possibly because someone started merge tracking with svnmerge then another used svn merge. It should be removed. -- Robert Kern I have come to believe that the whole

Re: [Numpy-discussion] def of var of complex

2008-01-08 Thread Robert Kern
important quantity. It's a parameter of a Gaussian distribution, and in this case, I see no reason to favor circular Gaussians in CC over general ones. But if someone shows me an actual application of the definition, I can amend my view. -- Robert Kern I have come to believe that the whole world

Re: [Numpy-discussion] def of var of complex

2008-01-08 Thread Robert Kern
. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco ___ Numpy-discussion mailing list Numpy-discussion

Re: [Numpy-discussion] def of var of complex

2008-01-08 Thread Robert Kern
with this, instead: E[|y - x|^2] But like I said, I see no particular reason to favor circular Gaussians over the general form for the implementation of numpy.var(). -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad

Re: [Numpy-discussion] Does float16 exist?

2008-01-08 Thread Robert Kern
Charles R Harris wrote: I see that there are already a number of parsers available for Python, SPARK, for instance is included in the 2.5.1 distribution. No, it isn't. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our

Re: [Numpy-discussion] def of var of complex

2008-01-08 Thread Robert Kern
Charles R Harris wrote: On Jan 8, 2008 7:48 PM, Robert Kern [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Charles R Harris wrote: Suppose you have a set of z_i and want to choose z to minimize the average square error $ \sum_i |z_i - z|^2 $. The solution

Re: [Numpy-discussion] def of var of complex

2008-01-08 Thread Robert Kern
Travis E. Oliphant wrote: Robert Kern wrote: Neal Becker wrote: I noticed that if I generate complex rv i.i.d. with var=1, that numpy says: var (real part) - (close to 1.0) var (imag part) - (close to 1.0) but var (complex array) - (close to complex 0) Is that not a strange

Re: [Numpy-discussion] Template system

2008-01-11 Thread Robert Kern
are contained in a single file. That would be fine to include, but I object strongly to incorporating Jinja. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying

Re: [Numpy-discussion] Template system

2008-01-11 Thread Robert Kern
Charles R Harris wrote: On Jan 11, 2008 2:58 PM, Robert Kern [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Charles R Harris wrote: Hi All, I'm thinking of adding the template system I pulled out of Django to Numpy to use in place of the current code

Re: [Numpy-discussion] Template system

2008-01-12 Thread Robert Kern
comfortable with an implementation that can simply be dropped in without modification. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco

Re: [Numpy-discussion] casting

2008-01-13 Thread Robert Kern
* obj, int typenum) takes an object and a type number. * PyArray_FROM_OTF(PyObject* obj, int typenum, int req) takes an object, type, and flags. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt

Re: [Numpy-discussion] casting

2008-01-14 Thread Robert Kern
Neal Becker wrote: Robert Kern wrote: Neal Becker wrote: numpy frequently refers to 'casting'. I'm not sure if that term is ever defined. I believe it has the same meaning as in C. In that case, it is unfortunately used to mean 2 different things. There are casts that do not change

Re: [Numpy-discussion] RFC: out of range slice indexes

2008-01-14 Thread Robert Kern
my code. It simplifies certain operations that would otherwise need tedious special case-handling. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth

Re: [Numpy-discussion] RFC: out of range slice indexes

2008-01-14 Thread Robert Kern
Neal Becker wrote: Robert Kern wrote: Neal Becker wrote: I've never liked that python silently ignores slices with out of range indexes. I believe this is a source of bugs (it has been for me). It goes completely counter to the python philosophy. I vote to ban them from numpy. from

Re: [Numpy-discussion] casting

2008-01-14 Thread Robert Kern
__array_interface__ or just nested sequences, too. You can look at the PyArray_Descr directly, dispatch the types that you can handle directly, and then convert for the types which you can't. You will not get any extraneous conversions or copies of data. -- Robert Kern I have come to believe that the whole

Re: [Numpy-discussion] numpy quit working

2008-01-16 Thread Robert Kern
. import new new module 'new' from 'C:\Python25\lib\new.pyc' If that filename does not point to 'C:\Python25\lib\new.pyc', then you have a problem. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt

Re: [Numpy-discussion] def of var of complex

2008-01-21 Thread Robert Kern
variables, that is an ambiguity you have to resolve. There is, apparently, a large body of statistical signal processing literature that defines the complex variance as E{|z-E[z]|^2} so, I (now) believe that this is what should be implemented. -- Robert Kern I have come to believe

Re: [Numpy-discussion] Docstring page, out of date?

2008-01-21 Thread Robert Kern
: for example, the current developement doc of python (http://docs.python.org/dev/) looks pretty good to me, and using the same tools as python makes more sense than forking our own, no ? Or am I missing something fundamental ? Yes. Sphinx does not do automatically generated documentation. -- Robert

Re: [Numpy-discussion] Building a static libnumpy

2008-01-21 Thread Robert Kern
uses sort of extended distutils. I was wondering if this extended distutils enables building of static libraries or do I have to go the cumbersome Makefile-way again? Cumbersome Makefile, sorry. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma

Re: [Numpy-discussion] Docstring standard: how to specify variable types

2008-01-24 Thread Robert Kern
around the corner! Personally, I don't think it's worth standardizing. If it's readable and valid reST, just do it. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had

Re: [Numpy-discussion] [ANN] numscons 0.3.0 release

2008-01-25 Thread Robert Kern
build infrastructure. It requires branches for us to evaluate. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco

Re: [Numpy-discussion] difference numpy/matlab

2008-01-29 Thread Robert Kern
/session log -- No, numpy is entirely consistent. In[26] has Python's complex numbers, not numpy's. In [1]: from numpy import complex64 In [2]: complex64(3+1j) complex64(-1+3j) Out[2]: True -- Robert Kern I have come to believe

Re: [Numpy-discussion] [F2PY]: Allocatable Arrays

2008-02-01 Thread Robert Kern
. Are you going to continue not reading the f2py list? If so, you should point everyone there to this list and close the list. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had

Re: [Numpy-discussion] Unexpected behavior with numpy array

2008-02-03 Thread Robert Kern
of memory ownership and object lifetime issues. If you can modify the C code, it might be easier for you to have numpy allocate the memory, then make the C code use that pointer to do its operations. But look at numpy.memmap first and see if it fits your needs. -- Robert Kern I have come

Re: [Numpy-discussion] Unexpected behavior with numpy array

2008-02-03 Thread Robert Kern
Damian Eads wrote: Robert Kern wrote: Damian Eads wrote: Here's another question: is there any way to construct a numpy array and specify the buffer address where it should store its values? I ask because I would like to construct numpy arrays that work on buffers that come from mmap

Re: [Numpy-discussion] Bug in numpy all() function

2008-02-06 Thread Robert Kern
for generators, but it would be a special case. We wouldn't be able to test for arbitrary iterables. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth

Re: [Numpy-discussion] random enhancement

2008-02-06 Thread Robert Kern
, but I'm not sure. Contributions are, of course, welcome. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco

Re: [Numpy-discussion] Bug in numpy all() function

2008-02-06 Thread Robert Kern
Anne Archibald wrote: On 06/02/2008, Robert Kern [EMAIL PROTECTED] wrote: I guess the all function doesn't know about generators? Yup. It works on arrays and things it can turn into arrays by calling the C API equivalent of numpy.asarray(). There's a ton of magic and special cases

Re: [Numpy-discussion] Numpy-discussion Digest, Vol 17, Issue 15

2008-02-08 Thread Robert Kern
to messages normally. Thank you. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco ___ Numpy

Re: [Numpy-discussion] Setting contents of buffer for array object

2008-02-10 Thread Robert Kern
? Not really, no. Can you describe your use case in more detail? -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco

Re: [Numpy-discussion] Setting contents of buffer for array object

2008-02-10 Thread Robert Kern
anything at all; otherwise, median(x, out=out) is no better than out[:] = median(x). Personally, I don't think that a function should expose an out= parameter unless if it can make good on that promise of memory efficency. Can you show us the current implementation that you have? -- Robert Kern

Re: [Numpy-discussion] non-contiguous array error

2008-02-10 Thread Robert Kern
is stored in memory, and this messed up the call to .shape? No. The problem is that (27) is not a tuple. Parentheses are also used for grouping expressions in Python, so a single-element tuple needs a comma to disambiguate. You want d.shape = (27,). -- Robert Kern I have come to believe

Re: [Numpy-discussion] Setting contents of buffer for array object

2008-02-10 Thread Robert Kern
algorithms out there which can make use of the memory efficiently. I wanted to establish the call signature to allow that. I don't feel strongly about it though. I say add the out= parameter when you use such an algorithm. But if you like, just use slice assignment for now. -- Robert Kern I

Re: [Numpy-discussion] New bug with setup,py develop

2008-02-11 Thread Robert Kern
On Feb 11, 2008 3:49 AM, David Cournapeau [EMAIL PROTECTED] wrote: On Feb 11, 2008 5:38 PM, Robert Kern [EMAIL PROTECTED] wrote: On Feb 11, 2008 2:21 AM, Robert Kern [EMAIL PROTECTED] wrote: I've just updated the SVN trunk to get the latest numscons merge. Something broke the support I

Re: [Numpy-discussion] CTypes: How to incorporate a library with shared library module?

2008-02-11 Thread Robert Kern
On Feb 12, 2008 12:41 AM, Damian Eads [EMAIL PROTECTED] wrote: Robert Kern wrote: On Feb 12, 2008 12:14 AM, Damian Eads [EMAIL PROTECTED] wrote: David Cournapeau wrote: On Mon, 2008-02-11 at 22:50 -0700, Damian Eads wrote: Dear Lou, You may want to try using distutils or setuputils

Re: [Numpy-discussion] CTypes: How to incorporate a library with shared library module?

2008-02-11 Thread Robert Kern
not generate a shared library on a mac? Python extension modules are shared libraries, yes. But they must follow a particular format, namely exposing a correct initmodulename function. distutils/setuptools only maked Python extension modules, not arbitrary shared libraries. -- Robert Kern I have come

Re: [Numpy-discussion] CTypes: How to incorporate a library with shared library module?

2008-02-11 Thread Robert Kern
not generate a shared library on a mac? As to David's point, yes, distutils makes a .so shared library on Macs. This is not the same thing as a dynamic library (on Macs) which is what ctypes needs (on Macs), IIRC. There is a subtle, but important difference between the two. -- Robert Kern I have come

[Numpy-discussion] New bug with setup,py develop

2008-02-11 Thread Robert Kern
to add the --inplace option. This used to work as of r4772, but now any Fortran Extensions have the generated sources added twice. This causes links to fail since the same symbol shows up twice. David, any ideas? -- Robert Kern I have come to believe that the whole world is an enigma, a harmless

Re: [Numpy-discussion] New bug with setup,py develop

2008-02-11 Thread Robert Kern
On Feb 11, 2008 2:21 AM, Robert Kern [EMAIL PROTECTED] wrote: I've just updated the SVN trunk to get the latest numscons merge. Something broke the support I put in for the setuptools develop command. In order to make sure that setuptools' develop works with numpy.distutils' build_src, we

Re: [Numpy-discussion] Median advice

2008-02-12 Thread Robert Kern
. If the same signature is used, there is no need to special-case median(). I realise it's kind of a niche example, though. I'm happy with that use case. The docstring should mention that out= is not memory-optimized like it is for the others, though. -- Robert Kern I have come to believe

Re: [Numpy-discussion] unexpected downcast

2008-02-13 Thread Robert Kern
). Is there a reason for it? That's just what asfarray is designed to do. If you don't give it a dtype, it uses float64. Changing it would be a redesign of the function that may break code. The amount of code is probably minimal, so I'm only -0 on changing it. -- Robert Kern I have come to believe

<    4   5   6   7   8   9   10   11   12   13   >