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

Re: [Numpy-discussion] C code coverage tool

2009-10-27 Thread Michael Droettboom
On 10/27/2009 05:11 AM, Pauli Virtanen wrote: 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

[Numpy-discussion] Using matplotlib's prctile on masked arrays

2009-10-27 Thread Gökhan Sever
Hello, Consider this sample two columns of data: 99. 99. 99. 99. 99. 99. 99. 1693.9069 99. 1676.1059 99. 1621.5875 651.8040 1542.1373 691.0138 1650.4214 678.5558 1710.7311

[Numpy-discussion] C-API: How is data filling done in PyArray_SimpleNewFromData ?

2009-10-27 Thread Raspaud Martin
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello, I’m using numpy v1.2.0, and I have the following codes that provide different results : - - cal = (PyArrayObject *)PyArray_SimpleNew(2,dims,NPY_FLOAT); for(i=0;idims[0];i++) for(j=0;jdims[1];j++) { *((npy_float

Re: [Numpy-discussion] Multiplicity of an entry

2009-10-27 Thread Christopher Barker
Nadav Horesh wrote: np.equal(a,a).sum(0) but, for unknown reason, np.equal operates only on normal arrays. true: In [25]: a Out[25]: array(['abc', 'def', 'abc', 'ghij'], dtype='|S4') In [27]: np.equal(a,a) Out[27]: NotImplemented however: In [28]: a == a Out[28]: array([ True,

Re: [Numpy-discussion] Using matplotlib's prctile on masked arrays

2009-10-27 Thread Pierre GM
On Oct 27, 2009, at 7:56 AM, Gökhan Sever wrote: Unfortunately, matplotlib.mlab's prctile cannot handle this division: Actually, the division's OK, it's mlab.prctile which is borked. It uses the length of the input array instead of its count to compute the nb of valid data. The easiest

Re: [Numpy-discussion] Multiplicity of an entry

2009-10-27 Thread Michael Droettboom
Christopher Barker wrote: Nadav Horesh wrote: np.equal(a,a).sum(0) but, for unknown reason, np.equal operates only on normal arrays. true: In [25]: a Out[25]: array(['abc', 'def', 'abc', 'ghij'], dtype='|S4') In [27]: np.equal(a,a) Out[27]: NotImplemented however:

Re: [Numpy-discussion] C-API: How is data filling done in PyArray_SimpleNewFromData ?

2009-10-27 Thread Travis Oliphant
On Oct 27, 2009, at 7:43 AM, Raspaud Martin wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello, I’m using numpy v1.2.0, and I have the following codes that provide different results : - - cal = (PyArrayObject *)PyArray_SimpleNew(2,dims,NPY_FLOAT);

Re: [Numpy-discussion] Multiplicity of an entry

2009-10-27 Thread Travis Oliphant
On Oct 27, 2009, at 2:31 PM, Michael Droettboom wrote: Christopher Barker wrote: Nadav Horesh wrote: np.equal(a,a).sum(0) but, for unknown reason, np.equal operates only on normal arrays. true: In [25]: a Out[25]: array(['abc', 'def', 'abc', 'ghij'], dtype='|S4') In [27]:

Re: [Numpy-discussion] Multiplicity of an entry

2009-10-27 Thread Michael Droettboom
Travis Oliphant wrote: On Oct 27, 2009, at 2:31 PM, Michael Droettboom wrote: Christopher Barker wrote: Nadav Horesh wrote: np.equal(a,a).sum(0) but, for unknown reason, np.equal operates only on normal arrays. true: In [25]: a Out[25]: array(['abc',

[Numpy-discussion] Syntax highlighting for Cython and NumPy

2009-10-27 Thread Sturla Molden
Here is an XML for Cython syntax highlighting in katepart (e.g. KATE and KDevelop). I made this because KATE is my faviourite text edior (feel free to call me a heretic for not using emacs). Unfortunately, the Python highlighting for KDE contains several bugs. And the Pyrex/Cython version that

Re: [Numpy-discussion] [Cython] Syntax highlighting for Cython and NumPy

2009-10-27 Thread Sturla Molden
Sturla Molden skrev: and Cython with NumPy shows up under Sources. Anyway, this is the syntax high-lighter I use to write Cython. It seems I posted the wrong file. :-( S.M. ?xml version=1.0 encoding=UTF-8? !DOCTYPE language !-- Python syntax highlightning v0.9 by Per Wigren -- !-- Python

Re: [Numpy-discussion] [Cython] Syntax highlighting for Cython and NumPy

2009-10-27 Thread Sturla Molden
Lisandro Dalcin skrev: Is there any specific naming convention for these XML files to work with KATE? Would it be fine to call it 'cython-mode-kate.xml' to push it to the repo? Will it still work (I mean, with that name) when placed appropriately in KATE config dirs or whatever? ... Just