Re: [Numpy-discussion] Efficient ?axpy operation without copy (B += a*A)

2009-06-23 Thread Pauli Virtanen
in the version I > have (EPD), these also seem to make copies (though recent version seem > to be fixed by looking at the source.) I don't see many relevant changes in scipy.lib recently, so I'm not sure what change you mean by the above. -- Pauli Virtanen

Re: [Numpy-discussion] latex equations in docstrings

2009-06-24 Thread Pauli Virtanen
On 2009-06-24, Robert Kern wrote: [clip] > Yes. The HOWTO_BUILD_DOCS.txt is unfortunately out of date. So it is. Rewritten. -- Pauli Virtanen ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://mail.scipy.org/mailman/listinfo/nu

Re: [Numpy-discussion] fromfile and ticket #1152

2009-06-27 Thread Pauli Virtanen
n > fid.read(bytes) as the default, which simply returns as many items as could be > read before the EOF was reached, including zero. An additional strict > interface > could be added (by keyword) for those who want an exception raised whenever > the > requested read count cou

Re: [Numpy-discussion] stderr

2009-06-27 Thread Pauli Virtanen
dition. Also, an assert makes the program crash on C-level, which is clearly undesirable in a Python program as it cannot be handled. Raising an error here seems to be the proper thing to do. -- Pauli Virtanen ___ Numpy-discussion mailing list Numpy-

Re: [Numpy-discussion] np.memmap and memory usage

2009-07-01 Thread Pauli Virtanen
program runs. In this case, what is most likely actually taking up memory is the OS buffering the data in memory, before writing it to disk. Linux has at least some system-wide parameters available that tune the aggressiveness of data cachine. I suppose there may also be

Re: [Numpy-discussion] make html

2009-07-01 Thread Pauli Virtanen
cs[docname].deepcopy() > KeyError: 'reference/generalized_ufuncs' Do "make clean" first. -- Pauli Virtanen ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Numpy complex types, packing and C99

2009-07-01 Thread Pauli Virtanen
fallback when the C99 ones are not available. > What do you mean by "packing" ? C99 defines a complex type such that the real and imag parts are packed as in an array: double complex t; real = ((double*)&t)[0]; imag = ((double*)&t)

Re: [Numpy-discussion] Numpy complex types, packing and C99

2009-07-01 Thread Pauli Virtanen
ee/c99-complex-umath This has some risks: the system-provided complex-valued functions may be broken in different ways, or suffer from some subtle flaws. This is likely more common than having broken real-valued functions that have been around quite a while longer. (To give an example: casinh(1

Re: [Numpy-discussion] Numpy complex types, packing and C99

2009-07-02 Thread Pauli Virtanen
iling tests even if buildbots are OK... After repeating this cycle a couple of times, IIRC only some special cases of log survived :) Of course, if you meant to merge the tests first to the new implementations and that to trunk, this sounds better.

Re: [Numpy-discussion] roots and high-order polynomial

2009-07-03 Thread Pauli Virtanen
+1] = 0.5 A[j, j-1] = 0.5 A[-1,:] = -0.5*a[:-1]/a[-1] A[-1,-2] += 0.5 and the zeros are x = linalg.eig(A)[0] See eg. http://dx.doi.org/10.1016/j.apnum.2005.09.007 for more. -- Pauli Virtanen ___ Numpy-discussion mailing l

[Numpy-discussion] Adding new functions to Numpy

2009-07-04 Thread Pauli Virtanen
s can keep track of which features are supported in which version. -- Pauli Virtanen ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Problem with ML subscriptions?

2009-07-04 Thread Pauli Virtanen
ither this > list doesn't want me or there is some other problem. > Anyway it seems impossible to reach the right people. I don't think I am able to help you here. Forwarding this to the ML, so the list admins know. -- Pauli Virtanen

Re: [Numpy-discussion] The baffling behavior that just won't die

2009-07-06 Thread Pauli Virtanen
he old thread applies also here: instead of a file random.py, you have a package named 'random' in the working directory. -- Pauli Virtanen ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Mathematica vs Matlab vs Python

2009-07-08 Thread Pauli Virtanen
r also left it as an exercise for the reader to implement the data file parser in Matlab. I doubt it can be easily done in 20 lines :) -- Pauli Virtanen ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://mail.scipy.org/mailman/

[Numpy-discussion] Optimizing reduction loops (sum(), prod(), et al.)

2009-07-08 Thread Pauli Virtanen
Hi, Ticket #1143 points out that Numpy's reduction operations are not always cache friendly. I worked a bit on tuning them. Just to tickle some interest, a "pathological" case before optimization: In [1]: import numpy as np In [2]: x = np.zeros((8, 256)) In [3]: %timeit x.sum(ax

Re: [Numpy-discussion] Optimizing reduction loops (sum(), prod(), et al.)

2009-07-08 Thread Pauli Virtanen
, or whether it just walks the array in virtual C-order copying the data. If so, then it probably hits similar cache problems as the non-optimized reduction operation. -- Pauli Virtanen ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Optimizing reduction loops (sum(), prod(), et al.)

2009-07-08 Thread Pauli Virtanen
he ATNumPy route, or even have tunable parameters chosen at build or compile time. (Unless, of course, we want to bring a monster into the world -- think about cross-breeding distutils with the ATLAS build system :) -- Pauli Virtanen ___ NumPy

Re: [Numpy-discussion] performing operations in-place in numpy

2009-07-08 Thread Pauli Virtanen
airy. Anyway, it seems there is some auditing to do before this change can be safely considered. Also, the speedups obtained were fairly modest, 20%. Are they larger for more complicated expressions? (Ie. is there an expression whose execution time

Re: [Numpy-discussion] performing operations in-place in numpy

2009-07-09 Thread Pauli Virtanen
have to go through the list of exported functions, and check that none of them is problematic. (We know already that at least PyArray_Conjugate is.) -- Pauli Virtanen ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Optimizing reduction loops (sum(), prod(), et al.)

2009-07-09 Thread Pauli Virtanen
Thu, 09 Jul 2009 09:54:26 +0200, Matthieu Brucher kirjoitti: > 2009/7/9 Pauli Virtanen : [clip] >> I'm still kind of hoping that it's possible to make some minimal >> assumptions about CPU caches in general, and have a rule that decides a >> code path that

Re: [Numpy-discussion] performing operations in-place in numpy

2009-07-09 Thread Pauli Virtanen
nge ufunc semantics at this point, and I don't see ways in which one could distinguish between "temporary arrays" and refcount-1 arrays used in extension modules. -- Pauli Virtanen ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.

Re: [Numpy-discussion] performing operations in-place in numpy

2009-07-09 Thread Pauli Virtanen
t PyUFunc_GenericFunction is there, and the args tuple probably usually has new references of the contained objects. [CPython itself creates a new tuple when doing a = (np.zeros((4,)), np.zeros((5,))) np.add(*a) so that also in this case th

Re: [Numpy-discussion] speed up np.diag

2009-07-10 Thread Pauli Virtanen
this correct? The .flat iterator always traverses the array in virtual C-order, not in the order it's laid out in memory. -- Pauli Virtanen ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Optimizing reduction loops (sum(), prod(), et al.)

2009-07-13 Thread Pauli Virtanen
Wed, 08 Jul 2009 22:16:22 +, Pauli Virtanen kirjoitti: [clip] > On an older CPU (slower, smaller cache), the situation is slightly > different: > > http://www.iki.fi/pav/tmp/athlon.png > http://www.iki.fi/pav/tmp/athlon.txt > > On average, it's still an

Re: [Numpy-discussion] np.isfinite on structured arrays

2009-07-15 Thread Pauli Virtanen
t of type NotImplementedType. I would have expected it to raise a > NotImplementedError exception. > > Can anybody cast some light on this issue ? Thanks a lot in advance Seems like a bug. As I understand, NotImplemented is intended to be returned only from __lt_

Re: [Numpy-discussion] saving complex vector

2009-07-15 Thread Pauli Virtanen
Wed, 15 Jul 2009 10:05:12 -0400, Neal Becker kirjoitti: > Simple question. I want to save a complex vector as text in format > > real_0 imag_0\n > real_1 imag_1\n > ... > > I thought to use something like: > np.savetxt ('gen_qpsk.txt', (mod_out.real, mod_out.imag), fmt='%g %g\n') > > I need a

Re: [Numpy-discussion] Record arrays, nesting, and assignment

2009-07-15 Thread Pauli Virtanen
[clip] > > Generally, scalars are never views. a[0] pulls out a record scalar. > Assigning into that scalar does not affect the original memory. > a['point'] creates an array that is a view and assigning to the [0] > element of that array modifies the original memory. But then, why does it alter the first element of the sub-array? This seems like a bug... -- Pauli Virtanen ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Adding new functions to Numpy

2009-07-16 Thread Pauli Virtanen
On 2009-07-16, David Cournapeau wrote: > Hi Pauli, > > On Sat, Jul 4, 2009 at 9:59 PM, Pauli Virtanen wrote: >> Hi, >> >> When you add new functions to Numpy, please include >> >>    .. versionadded:: 1.4.0 > > What is the best way to do this in the

Re: [Numpy-discussion] VIGRA, NumPy and Fortran-order (again)

2009-07-17 Thread Pauli Virtanen
cache coherency of the reduction operations. Also these would be more efficient if the striding of the output array could be chosen freely. I wonder if it would be OK to make this change... -- Pauli Virtanen ___ NumPy-Discussion mailing list NumPy-D

Re: [Numpy-discussion] Adding new functions to Numpy

2009-07-18 Thread Pauli Virtanen
On 2009-07-18, David Cournapeau wrote: > On Fri, Jul 17, 2009 at 4:11 AM, Pauli Virtanen wrote: [clip] >> Yeah, currently there's no way to do that. I can probably add >> numpy*function/cfunction/... etc. directives that allow this. >> >> An alternative is to us

Re: [Numpy-discussion] My identity

2009-07-20 Thread Pauli Virtanen
On 2009-07-20, Keith Goodman wrote: [clip] > Oh, sorry, I misunderstood. Yes, a similar change was made to eye but > not to identity. Nasty, duplicated code there it seems... -- Pauli Virtanen ___ NumPy-Discussion mailing list NumPy-Disc

Re: [Numpy-discussion] Functions to pack/unpack bytes?

2009-07-29 Thread Pauli Virtanen
Wed, 29 Jul 2009 10:20:19 -0400, Neal Becker kirjoitti: [clip] > Can 'view' switch byteorder? Doesn't seem to work: [clip] I think not: view only alters the dtype, ie., the interpretation of the block of memory. It does not physically reorder the data in memory, which is necessary for unpacking

Re: [Numpy-discussion] Internal Math Library of Numpy

2009-07-30 Thread Pauli Virtanen
custom implementations for functions that are missing in it. > Are they platform independent? In practice, yes. There are some possible obscure corner cases currently in complex-valued inf/nan handling, though. -- Pauli Virtanen ___ NumPy-Disc

Re: [Numpy-discussion] itemsize() doesn't work

2009-08-21 Thread Pauli Virtanen
hits. This is the old Numeric module documentation. It probably doesn't describe all points of Numpy accurately. Of course, the URL is misleading... -- Pauli Virtanen ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] What type should / return in python 3k when applied to two integer types?

2009-08-28 Thread Pauli Virtanen
ly small and tasty... The main issue is probably just choosing an appropriate float return type, and personally I believe this should be same as numpy's default float. -- Pauli Virtanen ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Question about np.savez

2009-09-01 Thread Pauli Virtanen
d np.savez a list of ndarrays. It didn't complain, but when I > loaded the data back, the list had been turned into an ndarray. Is this > behaviour expected? It did surprise me. Below there is an example: [clip] It is expected. savez casts its input to arrays before savi

Re: [Numpy-discussion] ticket for O(n) median function?

2009-09-01 Thread Pauli Virtanen
t. I'd say that just go ahead and create one -- there's little harm done even if it's a duplicate. -- Pauli Virtanen ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Adding a 2D with a 1D array...

2009-09-09 Thread Pauli Virtanen
Wed, 09 Sep 2009 13:08:22 +0200, Ruben Salvador wrote: > Perfect! Thank you very much :D > > It's not obvious, though...I think I should read more deeply into > Python/NumPy...but for the use I'm giving to it... > > Anyway, I thought the pythonic way would be faster, but after trying > with a siz

Re: [Numpy-discussion] Error in header file - wrong mailing list?

2009-09-12 Thread Pauli Virtanen
e -pedantic -Werror in your CFLAGS. Just unset CFLAGS or so before compilation. Yes, comma at the end of enum list is not strictly valid C89, although it is valid C99 and already passes for most compilers. -- Pauli Virtanen

Re: [Numpy-discussion] Error in header file - wrong mailing list?

2009-09-12 Thread Pauli Virtanen
su, 2009-09-13 kello 01:47 +0300, Pauli Virtanen kirjoitti: [clip] > The error you get from the comma at the end of the enum must be because > you have > > -pedantic -Werror > > in your CFLAGS. Just > > unset CFLAGS > > or so before compilation.

Re: [Numpy-discussion] Error in header file - wrong mailing list?

2009-09-14 Thread Pauli Virtanen
Mon, 14 Sep 2009 09:08:34 +0200, Mads Ipsen wrote: [clip] > Well, I don't know you consider this as a valid argument, but to me its > a matter of removing a single comma, which will make the source less > sensitive to compilers and compiler flags. That's done.

Re: [Numpy-discussion] defmatrix move - new docstrings disappeared

2009-09-17 Thread Pauli Virtanen
; they are an improvement over the current svn version. Is that correct? > I can help with that if necessary. You have reviewer rights, so you can go and click the "OK to apply" buttons, to flag those changes that are better than SVN. Also, check that no unwanted or dan

Re: [Numpy-discussion] defmatrix move - new docstrings disappeared

2009-09-17 Thread Pauli Virtanen
always going to be a lot of work when we let the trunk and > doc-editor get too far out of sync. The work scales linearly with the size of the diff to SVN, so it's not extremely bad. Of course, it's a bit of a work to go through hundreds of potential docstrings in one sitting. --

Re: [Numpy-discussion] defmatrix move - new docstrings disappeared

2009-09-18 Thread Pauli Virtanen
sy to fix them, go ahead and tell them. Designing the UI and how it should work is the first part of the work in making any improvements. -- Pauli Virtanen ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] defmatrix move - new docstrings disappeared

2009-09-18 Thread Pauli Virtanen
Fri, 18 Sep 2009 07:42:08 +, Pauli Virtanen wrote: [clip] > I doubt that -- not so much has been moved around. It's easy to see from > "git log --stat -M -C" that only shape_base, getlimits, and machar have > been moved around since 2007. A complete listing obtained

Re: [Numpy-discussion] defmatrix move - new docstrings disappeared

2009-09-18 Thread Pauli Virtanen
olution. Sounds good, manual resolution for all new and removed pages is reasonably low-overhead, especially as there is no completely reliable way to detect when a new page is moved, or just new. -- Pauli Virtanen ___ NumPy-Discussion mailing list N

Re: [Numpy-discussion] I want to help with a numpy python 3.1.x port

2009-09-19 Thread Pauli Virtanen
t-svn rewrites the commits you dcommit to SVN. -- Pauli Virtanen ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] is ndarray.base the closest base or the ultimate base?

2009-09-21 Thread Pauli Virtanen
The closest base. If the documentation says the opposite, it's wrong. That it's the closest base also causes crashes when the base chain becomes longer than the stack limit. -- Pauli Virtanen ___ NumPy-Discussion mailing list NumPy-Dis

Re: [Numpy-discussion] is ndarray.base the closest base or the ultimate base?

2009-09-21 Thread Pauli Virtanen
creation. I don't know if anything in view creation requires that the immediate base is alive afterwards, but that seems unlikely, so I believe there's no reason not to make this change. Some (bad) code might be broken if this was changed, for example >>> y = x[::-1] >>&g

Re: [Numpy-discussion] numpy docstring sphinx pre-processors

2009-09-21 Thread Pauli Virtanen
you want to use it, you'll have to modify to match your module. -- Pauli Virtanen ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] something wrong with docs?

2009-09-21 Thread Pauli Virtanen
this, and I went > to the rst file to view the code, but that's obviously not a fix for > the rendering problem. The `sphinx.ext.doctest` extension is not enabled, so the testcode:: etc. directives are not available. I'm not sure if i

Re: [Numpy-discussion] something wrong with docs?

2009-09-22 Thread Pauli Virtanen
Mon, 21 Sep 2009 18:49:47 -0700, Fernando Perez wrote: > On Mon, Sep 21, 2009 at 11:32 AM, Pauli Virtanen wrote: >> The `sphinx.ext.doctest` extension is not enabled, so the testcode:: >> etc. directives are not available. I'm not sure if it should be enabled >> -- i

Re: [Numpy-discussion] something wrong with docs?

2009-09-23 Thread Pauli Virtanen
e), or enabling Sphinx's doctest extension and its support for those. What Fernando said about them being more clumsy to write and copy than separate code directives is of course true. I wonder if there's a technical fix that could be made in Sphinx, at least for HTML, to c

Re: [Numpy-discussion] Deserialized arrays with base mutate strings

2009-09-23 Thread Pauli Virtanen
e is how to create one: Please file a bug ticket in the Trac, thanks! Here is a simpler way, although one more difficult to accidentally: >>> a = numpy.frombuffer("A", dtype='S1') >>> a.flags.writeable = True >>> b = "A" >>> a[0] =

Re: [Numpy-discussion] Deserialized arrays with base mutate strings

2009-09-23 Thread Pauli Virtanen
s in the end possible to emit raw byte stream to a pickle somehow, not going through strings. If not, then a copy can't be avoided. -- Pauli Virtanen ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] chebyshev polynomials

2009-09-24 Thread Pauli Virtanen
to, 2009-09-24 kello 11:51 -0600, Charles R Harris kirjoitti: > Would it be appropriate to add a class similar to poly but instead > using chebyshev polynomials? That is, where we currently have [clip] Yes, I think. scipy.special.orthogonal would be the best place for this, I think. Numpy would pr

Re: [Numpy-discussion] chebyshev polynomials

2009-09-24 Thread Pauli Virtanen
to, 2009-09-24 kello 14:31 -0500, Robert Kern kirjoitti: > On Thu, Sep 24, 2009 at 14:18, Pauli Virtanen wrote: > > As a side note, should the cheby* versions of `polyval`, `polymul` etc. > > just be dropped to reduce namespace clutter? You can do the same things > > alre

Re: [Numpy-discussion] chebyshev polynomials

2009-09-24 Thread Pauli Virtanen
to, 2009-09-24 kello 13:53 -0600, Charles R Harris kirjoitti: [clip] > I was thinking of storing the chebyshev internally as the values at > the chebyschev points. This makes multiplication, differentiation and > such quite easy (resample and multiply/divide appropriatately). Its > equivalent to w

Re: [Numpy-discussion] Error building docs

2009-09-28 Thread Pauli Virtanen
return self.attributes[key] > KeyError: 'numbered' No ideas. I think I've seen KeyErrors before, but not from inside docutils. My only guess would be to remove the build directory and try again. If that does not help, I'd look into if there's some known issue with t

Re: [Numpy-discussion] numpy.numarray.transpose()

2009-09-28 Thread Pauli Virtanen
fixed at some point...) At the least, we should write a well-visible "differences to numarray" document that explains all differences and known bugs. -- Pauli Virtanen ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http:

Re: [Numpy-discussion] numpy.numarray.transpose()

2009-09-28 Thread Pauli Virtanen
anspose has the > same docstring as numpy.transpose. So it would be very helpful to first > correct the numpy.array.transpose documentation. numpy.numarray.transpose is numpy.transpose, so fixing this would involve implementing the numarray-style transpo

Re: [Numpy-discussion] numpy.numarray.transpose()

2009-09-29 Thread Pauli Virtanen
in the case the main problem becomes a wontfix. -- Pauli Virtanen ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] making the distinction between -0.0 and 0.0..

2009-09-29 Thread Pauli Virtanen
Tue, 29 Sep 2009 09:53:40 -0700, Christopher Barker wrote: [clip] > How can I identify -0.0? signbit -- Pauli Virtanen ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] __array_wrap__

2009-09-29 Thread Pauli Virtanen
retty big advantage. (I wonder if there is some way to > do some of these as a generic 'mixin'?) The usual approach is to use __getattr__, to forward many routines with little extra work. -- Pauli Virtanen ___ NumPy-Discussion m

Re: [Numpy-discussion] ufunc and errors

2009-09-30 Thread Pauli Virtanen
e of the docstring is generated by Numpy and cannot be modified. -- Pauli Virtanen ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] merging docs from wiki

2009-10-02 Thread Pauli Virtanen
econd error may also indicate a bug in patch generation. -- Pauli Virtanen ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Easy way to test documentation?

2009-10-05 Thread Pauli Virtanen
.. add 'sphinx.ext.autodoc', 'numpydoc' to extensions ... $ cp /some/path/modulename.py modulename.py $ vi index.rst ... add .. automodule:: modulename :members: ... $ make PYTHONPATH=$PWD html Could be automated. -- Pauli Virtanen __

Re: [Numpy-discussion] Google Groups archive?

2009-10-16 Thread Pauli Virtanen
cked, I tried. Maybe it's best just not to use Google Groups. IMO, gmane.org offers an equivalent if not superior service. -- Pauli Virtanen ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] object array alignment issues

2009-10-16 Thread Pauli Virtanen
d not be too > difficult to take advantage of this for avoiding unnecessary copies in > this scenario. I suppose this kind of check is easiest to do at compile-time, and defining a -DFORCE_ALIGNED? This wouldn't cause performance penalties for those architectures

Re: [Numpy-discussion] Objected-oriented SIMD API for Numpy

2009-10-21 Thread Pauli Virtanen
Wed, 21 Oct 2009 16:48:22 +0900, Mathieu Blondel wrote: [clip] > My original idea was to write the code in C with Intel/Alvitec/Neon > intrinsics and have this code binded to be able to call it from Python. > So the SIMD code would be compiled already, ready to be called from > Python. Like you sai

Re: [Numpy-discussion] Objected-oriented SIMD API for Numpy

2009-10-21 Thread Pauli Virtanen
place the Numpy routines. This type of project could probably also be started outside Numpy, and just monkey-patch the Numpy routines on import. -- Pauli Virtanen ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] numpy and C99

2009-10-23 Thread Pauli Virtanen
I guess the answer is "no". -- Pauli Virtanen ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] numpydoc without autosummary

2009-10-23 Thread Pauli Virtanen
ll for my project. Numpydoc hooks into sphinx.ext.autodoc's docstring mangling. So if you just need to have docstrings formatted, you can use Sphinx's auto*:: directives. -- Pauli Virtanen ___ NumPy-Discussion mailing list NumPy-Discussion@scip

Re: [Numpy-discussion] numpydoc without autosummary

2009-10-23 Thread Pauli Virtanen
r my project. Ah, you meant the stuff output by default to class docstrings. Currently, there's no way to turn this off, unfortunately. It seems there should be, though... -- Pauli Virtanen ___ NumPy-Discussion mailing list NumPy-Dis

Re: [Numpy-discussion] 500 internal server error from docs.scipy.org

2009-10-26 Thread Pauli Virtanen
Mon, 26 Oct 2009 08:15:51 -0400, Neal Becker wrote: > This link: > > http://docs.scipy.org/doc/scipy/reference/generated/ scipy.stats.var.html#scipy.stats.var > > gives 500 internal server error Now that's strange. It's a static

Re: [Numpy-discussion] C code coverage tool

2009-10-27 Thread Pauli Virtanen
Mon, 26 Oct 2009 14:26:20 -0400, Michael Droettboom wrote: > I know David Cournapeau has done some work on using gcov for coverage > with Numpy. > > Unaware of this, (doh! -- I should have Googled first), I wrote a small > C code-coverage tool built on top of valgrind's callgrind tool, so it > bas

Re: [Numpy-discussion] Segfault when using scipy.special.hermite?

2009-10-28 Thread Pauli Virtanen
rt that can cause problems is scipy.linalg.eig or numpy.linalg.eig, and, much less likely, scipy.special.gamma. The former are thin wrappers around LAPACK routines.) -- Pauli Virtanen ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mai

[Numpy-discussion] [RFC] complex functions in npymath

2009-10-30 Thread Pauli Virtanen
d if not, substitute the C99 functions with our npy_math implementations. This'd be great for scipy.special. -- Pauli Virtanen ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] [RFC] complex functions in npymath

2009-10-30 Thread Pauli Virtanen
Fri, 30 Oct 2009 18:34:07 +0900, David Cournapeau wrote: [clip] > Actually, I am in the process of cleaning my numpy branches for review, > and intend to push them into svn as fast as possible. Complex is pretty > high on the list. Great! > The missing piece in complex support in npymath is mostl

Re: [Numpy-discussion] [RFC] complex functions in npymath

2009-10-30 Thread Pauli Virtanen
pe, 2009-10-30 kello 18:57 +0900, David Cournapeau kirjoitti: [clip: struct return values] > Is this a problem in practice ? If two compilers differ in this, > wouldn't they have incompatible ABI ? Yep, it would be an incompatible ABI. I don't really know how common this in practice -- but there w

Re: [Numpy-discussion] 1.4.0: Setting a firm release date for 1st december.

2009-11-02 Thread Pauli Virtanen
s, please do it soon, Can we get the complex functions to npy_math for 1.4.0: could be useful for the next Scipy? This is pretty quick to do, I can just write up some more tests one evening and commit. -- Pauli Virtanen ___ NumPy-Discussion mailing lis

Re: [Numpy-discussion] persistent ImportError: No module named multiarray when moving cPickle files between machines

2009-11-05 Thread Pauli Virtanen
d on Windows were contaminated by \r\n line feeds". I looked in the two files you attached on Numpy trac, and noticed that they were different (sha1sum). -- Pauli Virtanen ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Deprecate np.max/np.min ?

2009-11-07 Thread Pauli Virtanen
ft axis=-1 and axis=0 allowed, in addition to axis=None. These seemed to be required by at least the masked arrays unit tests... -- Pauli Virtanen ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] initializing an array of lists

2009-11-09 Thread Pauli Virtanen
= np.frompyfunc(lambda x: list(), 1, 1) >>> a = np.empty((3, 4), dtype=np.object) >>> filler(a, a); array([[[], [], [], []], [[], [], [], []], [[], [], [], []]], dtype=object) >>> a[0,3].append(9) >>> a array([[[], [], [], [9]], [[

Re: [Numpy-discussion] Release notes for arraysetops changes

2009-11-09 Thread Pauli Virtanen
ma, 2009-11-09 kello 23:13 +, Neil Crighton kirjoitti: > I've written some release notes (below) describing the changes to > arraysetops.py. If someone with commit access could check that these sound ok > and add them to the release notes file, that would be great. Thanks, added! Paul

Re: [Numpy-discussion] allclose() does not check shape of inputs

2009-11-13 Thread Pauli Virtanen
Fri, 13 Nov 2009 11:54:51 +0100, Robert Cimrman wrote: > I think this is a bug: > > In [16]: np.allclose([1.0, 1.0], [1.1], rtol=0.1, atol=0.0) > Out[16]: True It's broadcasting. I'm not sure it is a bug: >>> np.allclose([1.0, 1.0], [1.1, 1.1, 1.1], rtol=

Re: [Numpy-discussion] bus error in embedded numpy

2009-11-13 Thread Pauli Virtanen
ython code from Matlab. Out of curiosity, how are you handling the Matlab RTLD_GLOBAL issue. Last time [1] I did something similar, I had to hack around it in an ugly way. .. [1] http://www.iki.fi/pav/software/pythoncall/index.html -- Pauli Virtanen __

Re: [Numpy-discussion] bus error in embedded numpy

2009-11-13 Thread Pauli Virtanen
I think everything was well, until you tried to run "import numpy" in the embedded process -- loading multiarray.so would fail because of missing symbols. But if it worked for you without the hack, then it must have been changed in the Matlab versions since then (and Pythoncall

Re: [Numpy-discussion] bus error in embedded numpy

2009-11-13 Thread Pauli Virtanen
on integration meant for numerical computations I would be surprised if CRT is really a problem. You essentially can pass data to Matlab only via Matlab's own interface -- CRT stuff like ownership of pointers to allocated memory, file handles etc. typically do not cross this boundary. -- Pauli Vi

Re: [Numpy-discussion] Failure building pdf doc

2009-11-20 Thread Pauli Virtanen
ted on sphinx bug > tracker 10 months ago by Pauli, is this indeed related ? I think I fixed this in r7751. -- Pauli Virtanen ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] 2to3c: 2to3 for C extensions

2009-11-22 Thread Pauli Virtanen
la, 2009-11-21 kello 20:00 -0500, David Warde-Farley kirjoitti: > Guido posted a link to this on Twitter, it might be of interest to > people interested in the NumPy Python 3 transition: > > http://dmalcolm.livejournal.com/3935.html > > It's doubtful this is a magic bullet (at least, not

Re: [Numpy-discussion] 2to3c: 2to3 for C extensions

2009-11-22 Thread Pauli Virtanen
su, 2009-11-22 kello 19:28 +0100, René Dudfield kirjoitti: [clip] > I've been working on this too... see the previous py3k thread for > details of my plan. See http://github.com/illume/numpy3k/tree/work > for my (not very much) progress. > > I don't have time for about a week to do any more work

[Numpy-discussion] Numpy on Python3

2009-11-22 Thread Pauli Virtanen
http://github.com/pv/numpy-work/tree/py3k $ mkdir -p $PWD/dist/lib/python3.1/site-packages $ python3 setup.py install --prefix=$PWD/dist $ cd $PWD/dist/lib/python3.1/site-packages && python3 Python 3.1.1+ (r311:74480, Oct 11 2009, 20:22:16) [GCC 4.4.1] on linux2 Type "help", "copyright", "credits

Re: [Numpy-discussion] Numpy on Python3

2009-11-23 Thread Pauli Virtanen
on Python3 Lähettäjä: David Cournapeau Päivämäärä: 23.11.2009 08:19 On Mon, Nov 23, 2009 at 2:35 PM, Pauli Virtanen wrote: > It might be nice to have this merged in at some point after 1.4.0 (after > the most obvious glaring bugs have been fixed), so that we could perhaps > start aiming for Py

Re: [Numpy-discussion] Numpy on Python3

2009-11-23 Thread Pauli Virtanen
Päivämäärä: 23.11.2009 08:08 On Sun, Nov 22, 2009 at 10:35 PM, Pauli Virtanen wrote: > http://github.com/pv/numpy-work/tree/py3k > > $ mkdir -p $PWD/dist/lib/python3.1/site-packages > $ python3 setup.py install --prefix=$PWD/dist > $ cd $PWD/dist/lib/python3.1/site-packages &&a

Re: [Numpy-discussion] Numpy on Python3

2009-11-23 Thread Pauli Virtanen
ore. I just wanted to breeze through and arrive as fast as possible at something that can be imported and works for simple things, so I didn't stop at anything that would take longer. I'll take a look at the rest later on. -- Pauli Virtanen __

Re: [Numpy-discussion] Numpy on Python3

2009-11-23 Thread Pauli Virtanen
Mon, 23 Nov 2009 08:58:47 +0100, Sturla Molden wrote: > Pauli Virtanen skrev: >> XXX: 3K: numpy.random is disabled for now, uses PyString_* XXX: 3K: >> numpy.ma is disabled for now -- some issues >> > I thought numpy.random uses Cython? Is it just a matter of recompil

Re: [Numpy-discussion] Bug in rec.fromarrays ; plus one other possible bug

2009-11-25 Thread Pauli Virtanen
S')]) > >>> np.rec.fromarrays(Cols,dtype=d) > recarray([('test', ''), ('\x00est', ''), ('\x00est', ''), ('\x00est', > ''), >('\x00est', ''), ('\x00est'

Re: [Numpy-discussion] Correlation function about a factor of 100 slower than matlab/mathcad ... but with fft even worse ?

2009-11-25 Thread Pauli Virtanen
ke, 2009-11-25 kello 19:23 +0100, qu...@gmx.at kirjoitti: [clip] > Could someone please investigate why correlate and especially > fftconvolve are orders of magnitude slower? Read http://projects.scipy.org/numpy/ticket/1260 ___ NumPy-Discussion mailing

[Numpy-discussion] Bytes vs. Unicode in Python3

2009-11-26 Thread Pauli Virtanen
'a' cease to hold. dtype titles If Bytes or Unicode, work similarly as field names. dtype format strings, datetime tuple, and any other "protocol" strings Bytes. User can pass in Unicode, but it's converted using UTF8 codec.

<    4   5   6   7   8   9   10   11   >