Re: [Numpy-discussion] Indexing issue with ndarrays

2016-08-26 Thread Sebastian Berg
On Fr, 2016-08-26 at 09:57 -0400, Joseph Fox-Rabinovitz wrote: > > > On Thu, Aug 25, 2016 at 4:37 PM, Sebastian Berg ns.net> wrote: > > On Do, 2016-08-25 at 10:36 -0400, Joseph Fox-Rabinovitz wrote: > > > This issue recently came up on Stack Overflow: http://st

Re: [Numpy-discussion] Which NumPy/Numpy/numpy spelling?

2016-08-31 Thread Sebastian Berg
to use NumPy, see also NumPy User Guide." > That's technically a bug: the official spelling is NumPy.  But, no > one > really cares :) > I like the fact that this is all posted in: [Numpy-discussion] ;). - Sebastian > Stéfan > >

Re: [Numpy-discussion] State-of-the-art to use a C/C++ library from Python

2016-09-02 Thread Sebastian Haase
How do these two relate to each other !? - Sebastian On Fri, Sep 2, 2016 at 12:33 PM, Carl Kleffner wrote: > maybe https://bitbucket.org/memotype/cffiwrap or https://github.com/ > andrewleech/cfficloak helps? > > C. > > > 2016-09-02 11:16 GMT+02:00 Nathaniel Smith : > &

[Numpy-discussion] New Indexing Methods Revival #N (subclasses!)

2016-09-03 Thread Sebastian Berg
ion? I can think of things, but nothing too great yet so maybe you guys got an elegant idea. - Sebastian signature.asc Description: This is a digitally signed message part ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org https://mail.scipy.o

Re: [Numpy-discussion] New Indexing Methods Revival #N (subclasses!)

2016-09-04 Thread Sebastian Berg
On Sa, 2016-09-03 at 21:08 +0200, Sebastian Berg wrote: > Hi all, > > not that I am planning to spend much time on this right now, however, > I > did a small rebase of the stuff I had (did not push yet) on oindex > and > remembered the old problem ;). > > The one

Re: [Numpy-discussion] New Indexing Methods Revival #N (subclasses!)

2016-09-04 Thread Sebastian Berg
On So, 2016-09-04 at 14:10 +0200, Sebastian Berg wrote: > On Sa, 2016-09-03 at 21:08 +0200, Sebastian Berg wrote: > > > > Hi all, > > > > not that I am planning to spend much time on this right now, > > however, > > I > > did a small rebase of the stu

Re: [Numpy-discussion] New Indexing Methods Revival #N (subclasses!)

2016-09-04 Thread Sebastian Berg
On So, 2016-09-04 at 11:20 -0400, Marten van Kerkwijk wrote: > Hi Sebastian, > > I haven't given this as much thought as it deserves, but thought I > would comment from the astropy perspective, where we both have direct > subclasses of `ndarray` (`Quantity`, `Column`,

Re: [Numpy-discussion] Correct error of invalid axis arguments.

2016-09-05 Thread Sebastian Berg
ut arrays all in one go). Putting explicit guards to every single python side function is of course possible too, but I am not quite convinced its worth the trouble. - Sebastian > Chuck > ___ > NumPy-Discussion mailing list > NumPy-Discussi

Re: [Numpy-discussion] New Indexing Methods Revival #N (subclasses!)

2016-09-05 Thread Sebastian Berg
On Mo, 2016-09-05 at 14:54 -0400, Marten van Kerkwijk wrote: > Hi Sebastian, > > Indeed, having the scalar pass through `__array_wrap__` would have > been useful (_finalize__ is too late, since one cannot change the > class any more, just set attributes).  But that is water und

Re: [Numpy-discussion] New Indexing Methods Revival #N (subclasses!)

2016-09-05 Thread Sebastian Berg
On Mo, 2016-09-05 at 18:24 -0400, Marten van Kerkwijk wrote: > Hi Sebastian, > > It would seem to me that any subclass has to keep up to date with new > features in ndarray, and while I think ndarray has a responsibility > not to break backward compatibility, I do not think it

Re: [Numpy-discussion] New Indexing Methods Revival #N (subclasses!)

2016-09-05 Thread Sebastian Berg
On Mo, 2016-09-05 at 18:19 -0500, Nathan Goldbaum wrote: > > > On Monday, September 5, 2016, Marten van Kerkwijk ail.com> wrote: > > Hi Sebastian, > > > > It would seem to me that any subclass has to keep up to date with > > new > > features i

Re: [Numpy-discussion] New Indexing Methods Revival #N (subclasses!)

2016-09-05 Thread Sebastian Berg
On Mo, 2016-09-05 at 21:02 -0400, Marten van Kerkwijk wrote: > p.s. Just to be clear: personally, I think we should have neither > `__numpy_getitem__` nor a mixin; we should just get the quite > wonderful new indexing methods! Hehe, yes but see MaskedArrays. They need logic to also index the mask,

Re: [Numpy-discussion] New Indexing Methods Revival #N (subclasses!)

2016-09-05 Thread Sebastian Berg
On Mo, 2016-09-05 at 18:31 -0400, Marten van Kerkwijk wrote: > Actually, on those names: an alternative to your proposal would be to > introduce only one new method which can do all types of indexing, > depending on a keyword argument, i.e., something like > ``` > def getitem(self, item, mode='oute

Re: [Numpy-discussion] New Indexing Methods Revival #N (subclasses!)

2016-09-06 Thread Sebastian Berg
On Mo, 2016-09-05 at 18:31 -0400, Marten van Kerkwijk wrote: > Actually, on those names: an alternative to your proposal would be to > introduce only one new method which can do all types of indexing, > depending on a keyword argument, i.e., something like > ``` > def getitem(self, item, mode='oute

Re: [Numpy-discussion] New Indexing Methods Revival #N (subclasses!)

2016-09-06 Thread Sebastian Berg
On Di, 2016-09-06 at 09:37 +0200, Sebastian Berg wrote: > On Mo, 2016-09-05 at 18:31 -0400, Marten van Kerkwijk wrote: > > > > Actually, on those names: an alternative to your proposal would be > > to > > introduce only one new method which can do all types of indexing,

Re: [Numpy-discussion] New Indexing Methods Revival #N (subclasses!)

2016-09-06 Thread Sebastian Berg
On Di, 2016-09-06 at 10:57 +0100, Robert Kern wrote: > On Tue, Sep 6, 2016 at 8:46 AM, Sebastian Berg s.net> wrote: > > > > On Di, 2016-09-06 at 09:37 +0200, Sebastian Berg wrote: > > > On Mo, 2016-09-05 at 18:31 -0400, Marten van Kerkwijk wrote: > > > &g

Re: [Numpy-discussion] New Indexing Methods Revival #N (subclasses!)

2016-09-06 Thread Sebastian Berg
On Di, 2016-09-06 at 10:10 -0700, Stephan Hoyer wrote: > On Mon, Sep 5, 2016 at 6:02 PM, Marten van Kerkwijk gmail.com> wrote: > > p.s. Just to be clear: personally, I think we should have neither > > `__numpy_getitem__` nor a mixin; we should just get the quite > > wonderful new indexing methods!

Re: [Numpy-discussion] New Indexing Methods Revival #N (subclasses!)

2016-09-06 Thread Sebastian Berg
, it would be a solution, but not sure it is any better implementation wise then just passing an extra argument. As for the syntax for plain arrays, I am not convinced to be honest. - Sebastian > In the end, though, probably also too complicated. It may remain best > to simply implement the

[Numpy-discussion] New iterator API (nditer): Overlap detection in NumPy

2016-09-07 Thread Sebastian Berg
no comments, I will probably merge it very soon, so we can look at the follow up things. - Sebastian [1] https://github.com/numpy/numpy/pull/8026 signature.asc Description: This is a digitally signed message part ___ NumPy-Discussion mailing list

Re: [Numpy-discussion] New iterator API (nditer): Overlap detection in NumPy

2016-09-07 Thread Sebastian Berg
On Mi, 2016-09-07 at 09:22 -0700, Nathaniel Smith wrote: > On Sep 7, 2016 9:03 AM, "Sebastian Berg" > wrote: > > > > Hi all, > > > > Pauli just opened a nice pull request [1] to add overlap detection > to > > the ne

[Numpy-discussion] Continued New Indexing Methods Revival #N (subclasses!)

2016-09-10 Thread Sebastian Berg
r a normal method. Can anyone think of a nicer way to do this trick that does not require quite as much hackery. Or is there an easy way to do the overloading check? - Sebastian signature.asc Description: This is a digitally signed message part ___ NumPy-

Re: [Numpy-discussion] Continued New Indexing Methods Revival #N (subclasses!)

2016-09-10 Thread Sebastian Berg
On Sa, 2016-09-10 at 12:01 +0200, Sebastian Berg wrote: > Hi all, > > from the discussion, I was thinking maybe something like this: > > class B(): >    def __numpy_getitem__(self, index, indexing_method="plain"): >        # do magic. >        return super().__n

Re: [Numpy-discussion] New Indexing Methods Revival #N (subclasses!)

2016-09-11 Thread Sebastian Berg
e have tests for things like masked array correctly calling the `_data` subclass, but if the `_data` subclass does not implement the new method, numpy would have to run in circles (or something) - Sebastian > In the end, though, probably also too complicated. It may remain best > to simply i

Re: [Numpy-discussion] New Indexing Methods Revival #N (subclasses!)

2016-09-11 Thread Sebastian Berg
On So, 2016-09-11 at 11:19 -0400, Marten van Kerkwijk wrote: > There remains the option to just let subclasses deal with new ndarray > features...  Certainly, for `Quantity`, I'll quite happily do that. > And if it alllows the ndarray code to remain simple and efficient, it > is probably the best s

Re: [Numpy-discussion] New iterator APIs (nditer / MapIter): Overlap detection in NumPy

2016-09-12 Thread Sebastian Berg
the worst API clutter in history. > > Continuation here: https://github.com/numpy/numpy/pull/8043 > > > > Wed, 07 Sep 2016 18:02:59 +0200, Sebastian Berg kirjoitti: > > > > > Hi all, > > > > Pauli just opened a nice pull request [1] to add overla

Re: [Numpy-discussion] New iterator APIs (nditer / MapIter): Overlap detection in NumPy

2016-09-12 Thread Sebastian Berg
On Mo, 2016-09-12 at 20:22 +, Pauli Virtanen wrote: > Mon, 12 Sep 2016 11:31:07 +0200, Sebastian Berg kirjoitti: > > > > > > > > * NPY_ITER_COPY_IF_OVERLAP, NPY_ITER_OVERLAP_NOT_SAME > > >   flags for NpyIter_New. > > > > > > * New API

Re: [Numpy-discussion] String & unicode arrays vs text loading in python 3

2016-09-13 Thread Sebastian Berg
es use one byte per character, unicode types will use 4 bytes per character. You can maybe default to unicode in more cases in python 3, but you cannot make them identical internally. What about giving `np.loadtxt` an encoding kwarg or something along that line? - Sebastian > > Is it accep

Re: [Numpy-discussion] [7949] How to handle these deprecation Warning errors

2016-09-26 Thread Sebastian Berg
d about it for those slots. The threading warnings seem also quite noisy (and useless), but not sure right away what the best approach for that would be. - Sebastian > But now these errors must be either fixed or skipped. This is where I > am facing problem. Pls suggest: > > 1. Iden

Re: [Numpy-discussion] Integers to negative integer powers, time for a decision.

2016-10-09 Thread Sebastian Berg
downstream would handle it. Also would we need an int power? The fpower seems more straight forward/common pattern. If errors turned out annoying in some cases, a seterr might be plausible too (as well as a deprecation). - Sebastian > Pluses > Backward compatible > Allows common powe

Re: [Numpy-discussion] how to name "contagious" keyword in np.ma.convolve

2016-10-14 Thread Sebastian Berg
bit overly odd to me to be honest. Just brain storming, you could think/name it the other way around maybe? Should the masked values be considered as zero/ignored? - Sebastian > Cheers, > Allan > > ___ > NumPy-Discussion ma

Re: [Numpy-discussion] fpower ufunc

2016-10-21 Thread Sebastian Berg
*38 which is < > > int64_max**2, > > FWIW. Or maybe there's some subtlety with the int->float casting > > here? > logical, (u)int8, (u)int16, and float16 get converted to float32, > which is probably sufficient to avoid overflow and such. My thought > was that floa

Re: [Numpy-discussion] fpower ufunc

2016-10-21 Thread Sebastian Berg
On Fr, 2016-10-21 at 09:45 +0200, Sebastian Berg wrote: > On Do, 2016-10-20 at 21:38 -0600, Charles R Harris wrote: > > > > > > > > On Thu, Oct 20, 2016 at 9:11 PM, Nathaniel Smith > > wrote: > > > > > > On Thu, Oct 20, 2016 at 7:58 PM, Cha

Re: [Numpy-discussion] Intel random number package

2016-10-26 Thread Sebastian Berg
that a backend change (if the default stream changes, an explicit one, though maybe one could make a "fastest") would be the only reasonable way to provide such a thing in numpy itself. - Sebastian > -- > Robert Kern > ___

Re: [Numpy-discussion] ufunc for sum of squared difference

2016-11-04 Thread Sebastian Berg
> Might be mixing up things, however, IIRC the single pass approach has a bad numerical accuracy, so that I doubt that it is a good default algorithm. - Sebastian > Thank you, > Matt > ___ > NumPy-Discussion mailing list > Num

Re: [Numpy-discussion] ufunc for sum of squared difference

2016-11-04 Thread Sebastian Berg
are operations look identical and I thought np.sum just calls > np.add.reduce, so the reduction step uses the same code and would > therefore have the same accuracy. > Sorry, did not read it carefully, I guess `c` is the mean, so you are doing the two pass method. - Sebastian > Thanks

Re: [Numpy-discussion] Numpy 1.12.x branched

2016-11-06 Thread Sebastian Berg
first beta > release in a couple of days. > Very cool, thanks for all the hard work! - Sebastian > Chuck > ___ > NumPy-Discussion mailing list > NumPy-Discussion@scipy.org > https://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Does numpy.bincount support numpy.float128 type weights?

2016-11-30 Thread Sebastian Berg
ouble) np.add.at(res, b, a) ``` will work, but do not expect it to be fast. - Sebastian On Do, 2016-12-01 at 05:54 +0800, Wei, Huayi wrote: > Hi, There, > > Here is a sample code using `numpy.bincount` > >  import numpy as np >  a = np.array([1.0, 2.0, 3.0], dtype=np.float1

Re: [Numpy-discussion] Casting to np.byte before clearing values

2016-12-26 Thread Sebastian Berg
7;t really know, but I guess it is not too surprising and may depend on other things as well. - Sebastian > > # Native float > Z_float = np.ones(100, float) > Z_int   = np.ones(100, int) > > %timeit Z_float[...] = 0 > 1000 loops, best of 3: 361 µs per loop >

Re: [Numpy-discussion] Default type for functions that accumulate integers

2017-01-03 Thread Sebastian Berg
an, so maybe it is time to give it a shot It would be interesting to see if anyone knows projects that may be affected (for example because they are designed to only run on windows or limited hardware), and if avoiding to change anything in python 2 might mitigate problems here as well (additionall

Re: [Numpy-discussion] Math Library

2010-04-11 Thread Sebastian Walter
sent to the list. I'm not sure how much I could contribute to the discussion since I have only quite hazy knowledge of the numpy core. However, I'm interested in the outcome of the refactoring since I'm facing a "similar" problem in http://github.com/b45ch1/taylorpoly where I&#

Re: [Numpy-discussion] INSTALLATION ON CYGWIN

2010-04-11 Thread Sebastian Haase
ot; to get somthing that is automatically optimized for your CPU. (You are using 32 bit XP or Vista or 7, right ?) Regards, Sebastian Haase On Sun, Apr 11, 2010 at 12:44 AM, AKI wrote: > There is too much out there which is making me confuse, I want to install > Numpy and Scipy on cygwin.

Re: [Numpy-discussion] rc2 for NumPy 1.4.1 and Scipy 0.7.2

2010-04-11 Thread Sebastian Haase
gt; again). Why not put these on the sourceforge page ?(I don't know anything about the technical issues, only a thought...) Regards, -Sebastian ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Math Library

2010-04-11 Thread Sebastian Walter
On Sun, Apr 11, 2010 at 12:59 PM, Sebastian Walter wrote: > On Tue, Apr 6, 2010 at 9:16 PM, Travis Oliphant > wrote: >> >> On Apr 6, 2010, at 9:08 AM, David Cournapeau wrote: >> >> Hi Travis, >> >> On Tue, Apr 6, 2010 at 7:43 AM, Travis Oliphant >&

Re: [Numpy-discussion] use of %extend

2010-04-15 Thread Sebastian Haase
did you mean to send this to the SWIG list !? -S. On Thu, Apr 15, 2010 at 11:53 AM, Michel Dupront wrote: > Hello, > > With the following example, given in the documentation: > > struct Vector { >    double x,y,z; > }; > %extend Vector { >     Vector __add__(Vector *other) { > Vector v;

Re: [Numpy-discussion] Math Library

2010-04-18 Thread Sebastian Walter
On Tue, Apr 13, 2010 at 12:29 AM, Charles R Harris wrote: > > > On Mon, Apr 12, 2010 at 4:19 PM, Travis Oliphant > wrote: >> >> On Apr 11, 2010, at 4:17 PM, Sebastian Walter wrote: >> >> > >> > Ermm, the reply above is quite poor, sorry about

Re: [Numpy-discussion] Release candidate 3 for NumPy 1.4.1 and SciPy 0.7.2

2010-04-19 Thread Sebastian Haase
Hi, Congratulations. I might be unnecessarily dense - but what SciPy am I supposed to use with the new numpy 1.4.1 for Python 2.5? I'm surprised that there are no SciPy 0.7.2 binaries for Python 2.5 - is that technically not possible ? Thanks, Sebastian Haase On Mon, Apr 19, 2010 at 6:

Re: [Numpy-discussion] Release candidate 3 for NumPy 1.4.1 and SciPy 0.7.2

2010-04-21 Thread Sebastian Haase
On Tue, Apr 20, 2010 at 2:23 AM, Ralf Gommers wrote: > > > On Mon, Apr 19, 2010 at 9:19 PM, Ralf Gommers > wrote: >> >> >> On Mon, Apr 19, 2010 at 4:21 PM, Ralf Gommers >> wrote: >>> >>> >>> On Mon, Apr 19, 2010 at 3:35 PM, Sebastia

[Numpy-discussion] ndimage.label - howto force SWIG to use int32 - even on 64bit Linux ?

2010-04-28 Thread Sebastian Haase
NPY_INT. But those are sometimes 32 sometimes 64 bit, depending on the system. Any ideas ... ? Thanks, Sebastian Haase ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

[Numpy-discussion] ndimage.label - howto force SWIG to use int32 - even on 64bit Linux ?

2010-04-28 Thread Sebastian Haase
typemaps of numpy.i I can choose between NPY_LONG and NPY_INT. But those are sometimes 32 sometimes 64 bit, depending on the system. Any ideas ... ? Thanks, Sebastian Haase ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http

Re: [Numpy-discussion] ndimage.label - howto force SWIG to use int32 - even on 64bit Linux ?

2010-04-29 Thread Sebastian Haase
a machine, where "int" is already 32 bits by default !? (I'm talking about the size of the resulting object file, I guess...) Thanks again for your help, Sebastian On Wed, Apr 28, 2010 at 11:51 PM, Bill Spotz wrote: > Both types of typemaps are enabled, so you just need to do you %

Re: [Numpy-discussion] ndimage.label - howto force SWIG to use int32 - even on 64bit Linux ?

2010-05-03 Thread Sebastian Haase
objects. I have that restricted to 3D contiguous data. scikits.image might already have had this function implementer in a general way ;-) Regards, Sebastian 2010/5/1 Stéfan van der Walt : > Hi Sebastian > > On 27 April 2010 10:27, Sebastian Haase wrote: >> Hi, >> I wanted

Re: [Numpy-discussion] Improvement of performance

2010-05-04 Thread Sebastian Walter
playing devil's advocate I'd say use Algorithmic Differentiation instead of finite differences ;) that would probably speed things up quite a lot. On Tue, May 4, 2010 at 11:36 PM, Davide Lasagna wrote: > If your x data are equispaced I would do something like this > def derive( func, x): > """

Re: [Numpy-discussion] Wrong Eigenvalue (Approximation?)

2010-05-17 Thread Sebastian Haase
ery nice (i.e. pleasing to the eye...) - Sebastian Haase ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Problem in swig

2010-05-20 Thread Sebastian Haase
Hi, I don't know exactly, but try replacing the one line %apply (float* INPLACE_ARRAY1, int DIM1) {(float *a, int na), (float *b, int nb)}; with two lines: %apply (float* INPLACE_ARRAY1, int DIM1) {(float *a, int na)}; %apply (float* INPLACE_ARRAY1, int DIM1) {(float *b, int nb)}; Don't know abo

Re: [Numpy-discussion] Introduction to Scott, Jason, and (possibly) others from Enthought

2010-05-26 Thread Sebastian Walter
I'd like to be able to do with the new C-API. Sebastian On Wed, May 26, 2010 at 8:21 AM, David Goldsmith wrote: > On Tue, May 25, 2010 at 9:22 PM, Travis Oliphant > wrote: >> >> On May 25, 2010, at 4:49 PM, David Goldsmith wrote: >> >> Travis: do you al

Re: [Numpy-discussion] Introduction to Scott, Jason, and (possibly) others from Enthought

2010-05-26 Thread Sebastian Walter
On Wed, May 26, 2010 at 12:31 PM, Pauli Virtanen wrote: > Wed, 26 May 2010 10:50:19 +0200, Sebastian Walter wrote: >> I'm a potential user of the C-API and therefore I'm very interested in >> the outcome. >> In the previous discussio

Re: [Numpy-discussion] Is there really a moderator that reviews posts?

2010-06-08 Thread Sebastian Haase
I don't want to complain But what is wrong with a limit of 40kB ? There are enough places where one could upload larger files for everyone interested... My 2 cents, Sebastian Haase PS: what is the limit now set to ? On Mon, Jun 7, 2010 at 11:24 PM, Vincent Davis wrote: > On Mo

[Numpy-discussion] typo in docs

2010-06-08 Thread Sebastian Haase
data-type fields are named 'f0', 'f2', ..., 'f' Is there a way for me to directly fix this kind of bug ? - -Sebastian Haase ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] typo in docs

2010-06-08 Thread Sebastian Haase
PS: I guess I should have filed two bug reports sorry. On Tue, Jun 8, 2010 at 9:46 AM, Sebastian Haase wrote: > Hi, > > http://docs.scipy.org/doc/numpy/reference/arrays.dtypes.html#specifying-and-constructing-data-types > > says "f2" instead of "f1" > >

[Numpy-discussion] np.append converts recarray to ndarray -- np.insert works

2010-06-08 Thread Sebastian Haase
Hi, Is there a reason that np.append converts recarray to ndarray while np.insert keeps recarray: >>> type(a) >>> type(N.append(a,a)) >>> type(N.insert(a,-1, a)) Thanks, Sebastian Haase ___ NumPy-Discussion mailing list

Re: [Numpy-discussion] Is there really a moderator that reviews posts?

2010-06-08 Thread Sebastian Haase
On Tue, Jun 8, 2010 at 5:23 PM, David Goldsmith wrote: > On Tue, Jun 8, 2010 at 12:10 AM, Sebastian Haase > wrote: >> >> I don't want to complain >> But what is wrong with a limit of 40kB ? There are enough places where >> one could upload larger files

Re: [Numpy-discussion] Greater common divisor

2010-06-08 Thread Sebastian Haase
quot; 556 while b: 557 a, b = b, a%b 558 return a or this: http://www.geekpedia.com/code120_Find-The-Greatest-Common-Divisor.html def euclid(numA, numB): while numB != 0: numRem = numA % numB numA = numB numB = numRem return numA HTH, Sebastian Haase O

Re: [Numpy-discussion] typo in docs

2010-06-09 Thread Sebastian Haase
On Wed, Jun 9, 2010 at 8:19 AM, Pierre GM wrote: > On Jun 8, 2010, at 4:37 AM, Sebastian Haase wrote: >> another note: >> http://docs.scipy.org/doc/numpy/reference/arrays.indexing.html#arrays-indexing-rec >> should not say "record array" - because recarray a &qu

Re: [Numpy-discussion] NumPy re-factoring project

2010-06-12 Thread Sebastian Walter
se meta programming which is very ill-designed. I'd rather like to see some simple code preprocessing on C code than C++ template meta programming. And it should be possible to avoid mallocs in the C code, not? > > 5. Allow OpenMP pragmas in the core. If arrays are above a certain size, i

Re: [Numpy-discussion] NumPy re-factoring project

2010-06-12 Thread Sebastian Walter
On Sat, Jun 12, 2010 at 3:57 PM, David Cournapeau wrote: > On Sat, Jun 12, 2010 at 10:27 PM, Sebastian Walter > wrote: >> On Thu, Jun 10, 2010 at 6:48 PM, Sturla Molden wrote: >>> >>> I have a few radical suggestions: >>> >>> 1. Use ctypes as g

Re: [Numpy-discussion] Tensor contraction

2010-06-14 Thread Sebastian Walter
ment by element basis is going to take a long time if you have big tensors. You could write a small benchmark and post the results here. I'm also curious what the result is going to be ;). As to your original question: I think it may be helpful to look at numpy.lib.stride_tricks There is

Re: [Numpy-discussion] [ANN] NLopt, a nonlinear optimization library

2010-06-17 Thread Sebastian Haase
Hi Steven, this sounds like the library I was looking for. Would you mind reading my post [SciPy-User] Global Curve Fitting of 2 functions to 2 sets of data-curves http://mail.scipy.org/pipermail/scipy-user/2010-June/025674.html ? I got many interesting answers, where apparently the agreement wa

Re: [Numpy-discussion] reduce array by computing min/max every n samples

2010-06-21 Thread Sebastian Haase
d be useful. For what it's worth, IDL also has a > function > called minmax() that does this (e.g. > http://astro.uni-tuebingen.de/software/idl/astrolib/misc/minmax.html) > My most favorite function I wrote many years ago using SWIG, I call mmms(arr) which returns a min,max,mean,std.dev

Re: [Numpy-discussion] debian benchmarks

2010-07-04 Thread Sebastian Haase
benchmark? > > Sturla Hi Sturla, what is this even about ... ? Do you have some references ? It does indeed sound interesting ... but what kind of code / problem are they actually testing here ? Thanks, Sebastian Haase ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Memory usage of numpy-arrays

2010-07-08 Thread Sebastian Haase
g as float32 binary. So the problem would "only" be the loading in - rather, going through - all lines of text from start to end without choking. This might be better done "by hand", i.e. in standard (non numpy) python: nums = [] for line in file("myTextFile.txt"):

Re: [Numpy-discussion] [Numpy-svn] r8413 - trunk/numpy/lib - Author: oliphant - Add percentile function.

2010-07-08 Thread Sebastian Haase
isn't this related to http://projects.scipy.org/numpy/ticket/626 percentile() and clamp() which was set to invalid -Sebastian On Sun, May 16, 2010 at 12:11 AM, wrote: > Author: oliphant > Date: 2010-05-15 17:11:10 -0500 (Sat, 15 May 2010) > New Revision: 8413 > > Modif

Re: [Numpy-discussion] numpy installation question (IronPython)

2010-07-13 Thread Sebastian Haase
multiarray module could > not be found using IronPython. > Hi William, Why do you think that numpy works in IronPython ? I thought most Python modules work only with "standard" (C) Python Numpy depends heavily on C implementations for most of its functi

Re: [Numpy-discussion] Problem with importing numpy in Ubuntu

2010-07-27 Thread Sebastian Haase
default to 4ByteUnicode. ( check >>> sys.maxunicode to see what you have; I get 1114111, i.e >65535 , so I have 4 byte (on Debian) ) So, most likely you have some "hand compiled" Python somewhere - Sebastian Haase On Tue, Jul 27, 2010 at 4:33 PM, Matthieu Br

Re: [Numpy-discussion] Problem with importing numpy in Ubuntu

2010-07-28 Thread Sebastian Haase
gt; >>>> sys.maxunicode >>> > 65535 >>> > >>> > I might have some "hand complied" python. Once I compiled Biopython >>> > long >>> > ago. >>> > >>> > The problem is I do not know how to cle

Re: [Numpy-discussion] ceil returns real ?

2010-07-28 Thread Sebastian Haase
gt; > Numpy version 1.3.0. > > Thanks, > Hi Mark, I don't know the answer, but Python 2.x has similar behavior for the built-in round(): round(2.7) returns 3.0 (float!) I think I read that Python 3.2 will change this to round(2.7) returning 3 (int!) - Sebastian Haase __

[Numpy-discussion] [ANN] ALGOPY 0.21, algorithmic differentiation in Python

2010-08-01 Thread Sebastian Walter
I'm happy to announce the first official release of ALGOPY in version 0.2.1. Rationale: The purpose of ALGOPY is the evaluation of higher-order derivatives in the forward and reverse mode of Algorithmic Differentiation (AD) using univariate Taylor polynomial arithmetic. Particular focus a

Re: [Numpy-discussion] ANN: Numexpr 1.4 released

2010-08-01 Thread Sebastian Haase
ives at google code these days) ... ? Thanks, Sebastian Haase ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] [ANN] ALGOPY 0.21, algorithmic differentiation in Python

2010-08-01 Thread Sebastian Walter
,6))) In [15]: y = x*z In [16]: z.shape Out[16]: (4, 1, 6) In [17]: y.shape Out[17]: (2, 3, 4, 5, 6) Sebastian > > John > > On Sun, Aug 1, 2010 at 5:05 AM, Sebastian Walter > wrote: >> >> I'm happy to announce the first official release of ALGOPY in version &

Re: [Numpy-discussion] [ANN] carray: an in-memory compressed data container

2010-08-21 Thread Sebastian Haase
h the compression factor ? Regards, Sebastian On Sat, Aug 21, 2010 at 1:31 AM, Francesc Alted wrote: > 2010/8/20, Zbyszek Szmek : >> OK, I've got a case where carray really shines :| >> >> zbys...@escher:~/python/numpy/carray-0.1.dev$ PYTHONPATH=. python >>

[Numpy-discussion] mingw-w64 tutorial ?

2010-08-21 Thread Sebastian Haase
using cygwin -- but that would only produce 32bit modules and should be unusable. So, the question is if someone has or knows of some tutorial about how to go about this - step by step. This info could maybe even go the scipy wiki Thanks, Sebastian

Re: [Numpy-discussion] mingw-w64 tutorial ?

2010-08-21 Thread Sebastian Haase
On Sat, Aug 21, 2010 at 11:29 PM, Christoph Gohlke wrote: > > > On 8/21/2010 1:44 PM, Sebastian Haase wrote: >> Hi, >> >> this is somewhat OT for this list, but since I know that David and >> many others here have lot's of experience compiling C ex

Re: [Numpy-discussion] mingw-w64 tutorial ?

2010-08-21 Thread Sebastian Haase
On Sun, Aug 22, 2010 at 12:02 AM, Christoph Gohlke wrote: > > > On 8/21/2010 2:37 PM, Sebastian Haase wrote: >> On Sat, Aug 21, 2010 at 11:29 PM, Christoph Gohlke  wrote: >>> >>> >>> On 8/21/2010 1:44 PM, Sebastian Haase wrote: >>>> Hi, &g

Re: [Numpy-discussion] mingw-w64 tutorial ?

2010-08-21 Thread Sebastian Haase
On Sun, Aug 22, 2010 at 3:39 AM, Sebastian Haase wrote: > On Sun, Aug 22, 2010 at 12:02 AM, Christoph Gohlke wrote: >> >> >> On 8/21/2010 2:37 PM, Sebastian Haase wrote: >>> On Sat, Aug 21, 2010 at 11:29 PM, Christoph Gohlke  wrote: >>>> >>>

Re: [Numpy-discussion] mingw-w64 tutorial ?

2010-08-21 Thread Sebastian Haase
On Sun, Aug 22, 2010 at 8:16 AM, Sebastian Haase wrote: > On Sun, Aug 22, 2010 at 3:39 AM, Sebastian Haase wrote: >> On Sun, Aug 22, 2010 at 12:02 AM, Christoph Gohlke wrote: >>> >>> >>> On 8/21/2010 2:37 PM, Sebastian Haase wrote: >>>> On Sat, A

Re: [Numpy-discussion] mingw-w64 tutorial ?

2010-08-22 Thread Sebastian Haase
On Sun, Aug 22, 2010 at 8:40 AM, Sebastian Haase wrote: > On Sun, Aug 22, 2010 at 8:16 AM, Sebastian Haase wrote: >> On Sun, Aug 22, 2010 at 3:39 AM, Sebastian Haase wrote: >>> On Sun, Aug 22, 2010 at 12:02 AM, Christoph Gohlke wrote: >>>> >>>> >&g

Re: [Numpy-discussion] mingw-w64 tutorial ?

2010-08-22 Thread Sebastian Haase
On Sun, Aug 22, 2010 at 9:41 AM, Sebastian Haase wrote: > On Sun, Aug 22, 2010 at 8:40 AM, Sebastian Haase wrote: >> On Sun, Aug 22, 2010 at 8:16 AM, Sebastian Haase wrote: >>> On Sun, Aug 22, 2010 at 3:39 AM, Sebastian Haase >>> wrote: >>>> On Sun, Aug

Re: [Numpy-discussion] mingw-w64 tutorial ?

2010-08-24 Thread Sebastian Haase
On Sun, Aug 22, 2010 at 10:35 AM, Robin wrote: > On Sun, Aug 22, 2010 at 8:41 AM, Sebastian Haase wrote: >>>>> Do you know if that contains a C++ compiler ?  The first page before >>>>> it starts the actual download has "Visual C++ Compilers" gra

Re: [Numpy-discussion] mingw-w64 tutorial ?

2010-08-24 Thread Sebastian Haase
On Wed, Aug 25, 2010 at 4:02 AM, David Cournapeau wrote: > On Wed, Aug 25, 2010 at 10:39 AM, Sebastian Haase wrote: > >> Robin, >> thanks for those links. >> My experience is more like the one described by fuzion at >> http://nukeit.org/compile-python-2-7-packages-w

Re: [Numpy-discussion] questions about a "complicated" user-defined dtype and the ufunc API

2010-08-26 Thread Sebastian Haase
On Thu, Aug 26, 2010 at 5:09 PM, Nathaniel Smith wrote: > On Mon, Aug 23, 2010 at 9:20 AM, Travis Oliphant > wrote: >> On Aug 22, 2010, at 4:36 PM, Nathaniel Smith wrote: >>> Question 2: Am I missing something, or does the ufunc API make this >>> impossible? The problem is that a "PyUFuncGeneric

Re: [Numpy-discussion] numpy histogram normed=True (bug / confusing behavior)

2010-08-29 Thread Sebastian Haase
e very > clear. A user sees all options and there is little chance of a > misunderstanding. Of course, a sentence like "If you want frequency > normalization, use histogram(data, normalized=False)/sum(data)" would > also make things clear, without adding the frequency option. > I am in favor of adding an option for the density mode (not for this release I guess). I often have a long expressing in place of `data` and the one extra keyword saves lot's of typing. -Sebastian Haase ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] inversion of large matrices

2010-09-01 Thread Sebastian Walter
is it really the covariance matrix you want to invert? Or do you want to compute something like x^T C^{-1} x, where x is an array of size N and C an array of size (N,N)? It would also be interesting to know how the covariance matrix gets computed and what its condition number is, at least approxim

Re: [Numpy-discussion] [NumPy-Tickets] [NumPy] #1348: CHM of Numpy Reference Guide (development version) is outdated

2010-09-06 Thread Sebastian Haase
Hi, is there an URL of the weekly built CHM documentation file ? Thanks, Sebastian Haase On Sun, Sep 5, 2010 at 6:39 PM, wrote: > #1348: CHM of Numpy Reference Guide (development version) is outdated > +--- >

Re: [Numpy-discussion] [NumPy-Tickets] [NumPy] #1348: CHM of Numpy Reference Guide (development version) is outdated

2010-09-06 Thread Sebastian Haase
On Mon, Sep 6, 2010 at 12:24 PM, Pauli Virtanen wrote: > Mon, 06 Sep 2010 10:41:38 +0200, Sebastian Haase wrote: >> >> is there an URL of the weekly built CHM documentation file ? > > It's the one linked from http://docs.scipy.org/doc/ > Hi Pauli, Thanks for

Re: [Numpy-discussion] ANNOUNCE: mahotas 0.5

2010-09-10 Thread Sebastian Haase
Hi Luis, thanks for the announcement. How would you compare mahotas to scipy's ndimage ? Are you using ndimage in mahotas at all ? Thanks, Sebastian Haase On Fri, Sep 10, 2010 at 4:50 AM, Luis Pedro Coelho wrote: > Hello everyone, > > My numpy based image processing toolbox

Re: [Numpy-discussion] Asking for opinions: Priops

2010-09-22 Thread Sebastian Walter
dtype=object 2) or create new numpy.ndarray -like class and set __array_priority__ > 2 both approaches work well for me. just my 2 cents, Sebastian On Thu, Sep 16, 2010 at 2:02 PM, Friedrich Romstedt wrote: > I just ran across the problem of priorities with ndarrays again and it > keeps

Re: [Numpy-discussion] Improvements to SciPy.org Server

2010-09-30 Thread Sebastian Haase
ously this is a general problem of wiki sites that exceed a certain life time ;-) (maybe there is a moinmoin plugin ...) Thanks for scipy, Sebastian Haase ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

[Numpy-discussion] ndarray: subclassing a subclass looses custom attribute

2010-10-01 Thread Sebastian Haase
ubclassing.html#simple-example-adding-an-extra-attribute-to-ndarray What can I do ? Thanks, Sebastian Haase ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] ndarray: subclassing a subclass looses custom attribute

2010-10-01 Thread Sebastian Haase
On Fri, Oct 1, 2010 at 11:26 AM, Sebastian Haase wrote: > Hi, > I'm trying to add a 'meta' attribute to ndarray to keep track of image > data filenames and resolution etc. > Following  the excellent document > http://docs.scipy.org/doc/numpy/user/basics.subclassing

Re: [Numpy-discussion] ndarray: subclassing a subclass looses custom attribute

2010-10-01 Thread Sebastian Haase
On Fri, Oct 1, 2010 at 12:38 PM, Pierre GM wrote: > > On Oct 1, 2010, at 11:26 AM, Sebastian Haase wrote: > >> Hi, >> I'm trying to add a 'meta' attribute to ndarray to keep track of image >> data filenames and resolution etc. >> Following  the

Re: [Numpy-discussion] ndarray: subclassing a subclass looses custom attribute

2010-10-01 Thread Sebastian Haase
On Fri, Oct 1, 2010 at 2:20 PM, Pierre GM wrote: > > On Oct 1, 2010, at 1:03 PM, Sebastian Haase wrote: > >>>> However, I had done this before for some specific image-file-types: >>>> those would add there own attribute to ndarray array (e.g. arr.Mrc) >>&g

<    2   3   4   5   6   7   8   9   >