[Numpy-discussion] Question about documentation for SWIG and ctypes numpy support

2013-01-29 Thread Valentin Haenel
Hi, I need to link the documentation on ctypes and SWIG support for Numpy. For ctypes I found: http://www.scipy.org/Cookbook/Ctypes Which seems to be reasonably up-to-date. There are of course also: http://docs.scipy.org/doc/numpy/reference/routines.ctypeslib.html There are also the

[Numpy-discussion] PR: tiny documentation fix, please merge

2013-02-01 Thread Valentin Haenel
https://github.com/numpy/numpy/pull/2960 thanks V- ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] numpy array to C API

2013-03-21 Thread Valentin Haenel
Dear Søren, if you are new to interfacing python/numpy with C/C++, you may want to check out: http://scipy-lectures.github.com/advanced/interfacing_with_c/interfacing_with_c.html Disclaimer: I am the author of this chapter, so this response is a bit of a shameless plug :D Hope it helps none

Re: [Numpy-discussion] numpy array to C API

2013-03-21 Thread Valentin Haenel
* Daniele Nicolodi dani...@grinta.net [2013-03-21]: On 21/03/2013 10:16, Valentin Haenel wrote: Dear Daniele * Daniele Nicolodi dani...@grinta.net [2013-03-21]: On 21/03/2013 09:45, Valentin Haenel wrote: if you are new to interfacing python/numpy with C/C++, you may want to check

Re: [Numpy-discussion] numpy array to C API

2013-03-21 Thread Valentin Haenel
, but the link in the article didn't seem to work. (Under Further Reading and References) There seems to be something wrong with Gaël's website. I have CC him, maybe he can fix it. best V- cheers Søren On 21/03/2013 09:41, Valentin Haenel wrote: Dear Søren, if you are new to interfacing

[Numpy-discussion] a list of all available integer dtypes

2013-08-09 Thread Valentin Haenel
Hi, I have a quick question: Is there a way to get a list of all available Numpy integer dtypes programatically? thanks, V- ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] a list of all available integer dtypes

2013-08-09 Thread Valentin Haenel
Hi, * Matthew Brett matthew.br...@gmail.com [2013-08-10]: On Fri, Aug 9, 2013 at 3:17 PM, Robert Kern robert.k...@gmail.com wrote: On Fri, Aug 9, 2013 at 11:06 PM, Valentin Haenel valen...@haenel.co wrote: I have a quick question: Is there a way to get a list of all available Numpy integer

Re: [Numpy-discussion] PEP 450 (stats module for standard library)

2013-08-16 Thread Valentin Haenel
* Chris Barker - NOAA Federal chris.bar...@noaa.gov [2013-08-16]: On Fri, Aug 16, 2013 at 8:20 AM, Alan G Isaac alan.is...@gmail.com wrote: http://www.python.org/dev/peps/pep-0450/ https://groups.google.com/forum/#!topic/comp.lang.python/IV-3mobU7L0 as numpy is the right way to do this

[Numpy-discussion] Question about typenum

2013-10-08 Thread Valentin Haenel
Hi, I have a quick question about typenum. Certain functions, like `PyArray_SimpleNewFromData` `PyArray_SimpleNew` take a typeenum argument. Is there any way to go from typeenum to something that can be passed to the dtype constructor, like mapping 12 - 'f8'? thanks, V-

Re: [Numpy-discussion] Question about typenum

2013-10-08 Thread Valentin Haenel
Hi Richard, * Richard Hattersley rhatters...@gmail.com [2013-10-08]: On 8 October 2013 13:23, Valentin Haenel valen...@haenel.co wrote: Certain functions, like `PyArray_SimpleNewFromData` `PyArray_SimpleNew` take a typeenum Is there any way to go from typeenum to something that can

Re: [Numpy-discussion] Question about typenum

2013-10-08 Thread Valentin Haenel
* Richard Hattersley rhatters...@gmail.com [2013-10-08]: On 8 October 2013 19:56, Valentin Haenel valen...@haenel.co wrote: I ended up using: PyArray_TypeObjectFromType from cython so: np.dtype(cnp.PyArray_TypeObjectFromType(self.ndtype)).str Maybe i can avoid the np.dtype call

Re: [Numpy-discussion] ANN: BLZ 0.6.1 has been released

2014-01-26 Thread Valentin Haenel
Hi Dinesh Vadhia, * Dinesh Vadhia dineshbvad...@hotmail.com [2014-01-26]: For me, binary data wrt arrays means that data values are [0|1]. Is this what is meant in The compression process is carried out internally by Blosc, a high-performance compressor that is optimized for binary data. ?

Re: [Numpy-discussion] About the npz format

2014-04-16 Thread Valentin Haenel
Hi Gilberto, * onefire onefire.mys...@gmail.com [2014-04-16]: I have been playing with the idea of using Numpy's binary format as a lightweight alternative to HDF5 (which I believe is the right way to do if one does not have a problem with the dependency). I am pretty happy with the npy

Re: [Numpy-discussion] About the npz format

2014-04-17 Thread Valentin Haenel
Hi again, * David Palao dpalao.pyt...@gmail.com [2014-04-17]: 2014-04-16 20:26 GMT+02:00 onefire onefire.mys...@gmail.com: Hi all, I have been playing with the idea of using Numpy's binary format as a lightweight alternative to HDF5 (which I believe is the right way to do if one does

Re: [Numpy-discussion] About the npz format

2014-04-17 Thread Valentin Haenel
Hi, * Julian Taylor jtaylor.deb...@googlemail.com [2014-04-17]: On 17.04.2014 21:30, onefire wrote: Hi Nathaniel, Thanks for the suggestion. I did profile the program before, just not using Python. one problem of npz is that the zipfile module does not support streaming data in (or

Re: [Numpy-discussion] About the npz format

2014-04-17 Thread Valentin Haenel
* Valentin Haenel valen...@haenel.co [2014-04-17]: * Valentin Haenel valen...@haenel.co [2014-04-17]: Hi, * Julian Taylor jtaylor.deb...@googlemail.com [2014-04-17]: On 17.04.2014 21:30, onefire wrote: Hi Nathaniel, Thanks for the suggestion. I did profile the program

Re: [Numpy-discussion] About the npz format

2014-04-17 Thread Valentin Haenel
Hi, * Valentin Haenel valen...@haenel.co [2014-04-17]: * Valentin Haenel valen...@haenel.co [2014-04-17]: * Valentin Haenel valen...@haenel.co [2014-04-17]: Hi, * Julian Taylor jtaylor.deb...@googlemail.com [2014-04-17]: On 17.04.2014 21:30, onefire wrote: Hi Nathaniel

Re: [Numpy-discussion] About the npz format

2014-04-17 Thread Valentin Haenel
Hello, * Valentin Haenel valen...@haenel.co [2014-04-17]: As part of bloscpack.sysutil I have wrapped this to be available from Python (needs root though). So, to re-rurn the benchmarks, doing each one twice: Actually, I just realized, that doing a ``sync`` doesn't require root. my bad, V

Re: [Numpy-discussion] About the npz format

2014-04-18 Thread Valentin Haenel
Hi Gilberto, * onefire onefire.mys...@gmail.com [2014-04-18]: Interesting! Using sync() as you suggested makes every write slower, and it decreases the time difference between save and savez, so maybe I was observing the 10 times difference because the file system buffers were being flushed

Re: [Numpy-discussion] About the npz format

2014-04-18 Thread Valentin Haenel
Hi again, * onefire onefire.mys...@gmail.com [2014-04-18]: I think your workaround might help, but a better solution would be to not use Python's zipfile module at all. This would make it possible to, say, let the user choose the checksum algorithm or to turn that off. Or maybe the

Re: [Numpy-discussion] About the npz format

2014-04-18 Thread Valentin Haenel
Hi, * Valentin Haenel valen...@haenel.co [2014-04-17]: * Valentin Haenel valen...@haenel.co [2014-04-17]: * Julian Taylor jtaylor.deb...@googlemail.com [2014-04-17]: On 17.04.2014 21:30, onefire wrote: Thanks for the suggestion. I did profile the program before, just not using

Re: [Numpy-discussion] 100 Numpy exercices

2014-05-28 Thread Valentin Haenel
Hi Nicolas, * Nicolas Rougier nicolas.roug...@inria.fr [2014-05-27]: I've updated the numpy exercices collection and made it available on github at: https://github.com/rougier/numpy-100 These exercices mainly comes from this mailing list and also from stack overflow. If you have other

Re: [Numpy-discussion] 100 Numpy exercices

2014-05-29 Thread Valentin Haenel
! In that case I must make sure not break it (too often). V- Nicolas On 28 May 2014, at 23:46, Valentin Haenel valen...@haenel.co wrote: Hi Nicolas, * Nicolas Rougier nicolas.roug...@inria.fr [2014-05-27]: I've updated the numpy exercices collection and made it available on github

Re: [Numpy-discussion] parsing dtype descriptors

2014-07-03 Thread Valentin Haenel
Dear Ted, * Ted Sandler ted.sand...@gmail.com [2014-07-03]: Hi all, is there a spec or grammar for valid values of numpy dtype descriptor strings? I am writing code to parse .npy files from Java and want to be able to handle the range of ndarray descriptor strings. I came across this code:

Re: [Numpy-discussion] parsing dtype descriptors

2014-07-04 Thread Valentin Haenel
Dear Ted, * Ted Sandler ted.sand...@gmail.com [2014-07-03]: Thanks. No, it's not what I'm looking for. I'm looking for the code that parses the string i8 in the npy file array header's descriptor: {'descr': 'i8', 'fortran_order': False, 'shape': (5,), } There are many different

Re: [Numpy-discussion] About the npz format

2014-07-04 Thread Valentin Haenel
sorry, for the top-post, but should we add this as an issue on the github tracker? I'd like to revisit it this summer. V- * Julian Taylor jtaylor.deb...@googlemail.com [2014-04-18]: On 18.04.2014 18:29, Valentin Haenel wrote: Hi, * Valentin Haenel valen...@haenel.co [2014-04-17

Re: [Numpy-discussion] ANN: python-blosc 1.2.7 released

2014-07-07 Thread Valentin Haenel
Hi, * Francesc Alted fal...@gmail.com [2014-07-07]: [snip] There is also a handy command line and Python library for Blosc called Bloscpack (https://github.com/Blosc/bloscpack) that allows you to compress large binary datafiles on-disk. For this list, you might be interested to know, that

[Numpy-discussion] [ANN] bcolz 0.7.2

2014-10-12 Thread Valentin Haenel
== Announcing bcolz 0.7.2 == What's new == This is a maintenance release that fixes various bits and pieces. Importantly, compatibility with Numpy 1.9 and Cython 0.21 has been fixed and the test suit no longer segfaults on 32 bit UNIX.

[Numpy-discussion] Question about dtype

2014-12-10 Thread Valentin Haenel
Hi, I am using numpy version 1.9.0 and Python 2.7.9 and have a question about the dtype: In [14]: np.dtype(f8) Out[14]: dtype('float64') In [15]: np.dtype(uf8) Out[15]: dtype('float64') In [16]: np.dtype([(f8, f8)]) Out[16]: dtype([('f8', 'f8')]) So far so good. Now what happens if I use

Re: [Numpy-discussion] Question about dtype

2014-12-12 Thread Valentin Haenel
Dear Nathaniel, thanks very much for your response. * Nathaniel Smith n...@pobox.com [2014-12-11]: On Wed, Dec 10, 2014 at 8:26 PM, Valentin Haenel valen...@haenel.co wrote: I am using numpy version 1.9.0 and Python 2.7.9 and have a question about the dtype: In [14]: np.dtype(f8) Out

Re: [Numpy-discussion] Question about dtype

2014-12-26 Thread Valentin Haenel
Hi, * Sebastian se...@sebix.at [2014-12-13]: I'll just comment on the creation of your dtype: dt = [(f8, f8)] You are creating a dtype with one field called 'f8' and with type 'f8': dt = [(f8, f8)] dty = np.dtype(dt) dty.names ('f8',) What you may want are two fields with

Re: [Numpy-discussion] Question about dtype

2014-12-26 Thread Valentin Haenel
* Eelco Hoogendoorn hoogendoorn.ee...@gmail.com [2014-12-13]: This is a general problem in trying to use JSON to send arbitrary python objects. Its not made for that purpose, JSON itself only supports a very limited grammar (only one sequence type for instance, as you noticed), so in general

Re: [Numpy-discussion] Question about dtype

2014-12-26 Thread Valentin Haenel
* Nathaniel Smith n...@pobox.com [2014-12-13]: [snip] Ah, so your question is about how to serialize dtypes. The simplest approach would be to use pickle and shove the resulting string into your json. However, this is very dangerous if you need to process untrusted files, because if I can

Re: [Numpy-discussion] Question about dtype

2014-12-26 Thread Valentin Haenel
* Valentin Haenel valen...@haenel.co [2014-12-27]: * Nathaniel Smith n...@pobox.com [2014-12-13]: [snip] Ah, so your question is about how to serialize dtypes. The simplest approach would be to use pickle and shove the resulting string into your json. However, this is very dangerous

[Numpy-discussion] Access dtype kind from cython

2014-12-29 Thread Valentin Haenel
Hi, how do I access the kind of the data from cython, i.e. the single character string: 'b' boolean 'i' (signed) integer 'u' unsigned integer 'f' floating-point 'c' complex-floating point 'O' (Python) objects 'S', 'a' (byte-)string 'U' Unicode 'V' raw data (void) In regular Python I can do: In

Re: [Numpy-discussion] Access dtype kind from cython

2014-12-30 Thread Valentin Haenel
* Eric Moore e...@redtetrahedron.org [2014-12-30]: On Monday, December 29, 2014, Valentin Haenel valen...@haenel.co wrote: Hi, how do I access the kind of the data from cython, i.e. the single character string: 'b' boolean 'i' (signed) integer 'u' unsigned integer 'f' floating

Re: [Numpy-discussion] Access dtype kind from cython

2015-01-01 Thread Valentin Haenel
Hi, * Nathaniel Smith n...@pobox.com [2014-12-31]: On Tue, Dec 30, 2014 at 11:03 PM, Valentin Haenel valen...@haenel.co wrote: * Eric Moore e...@redtetrahedron.org [2014-12-30]: On Monday, December 29, 2014, Valentin Haenel valen...@haenel.co wrote: Hi, how do I access the kind

[Numpy-discussion] [ANN] bcolz v0.8.0

2015-01-09 Thread Valentin Haenel
== Announcing bcolz 0.8.0 == What's new == This version adds a public API in the form of a Cython definitions file (``carray_ext.pxd``) for the ``carray`` class! This means, other libraries can use the Cython definitions to build more complex

[Numpy-discussion] [ANN] bcolz 0.7.3

2015-01-04 Thread Valentin Haenel
== Announcing bcolz 0.7.3 == What's new == This release includes the support for pickling persistent carray/ctable objects contributed by Matthew Rocklin. Also, the included version of Blosc is updated to ``v1.5.2``. Lastly, several minor issues

[Numpy-discussion] [ANN] bcolz v0.9.0

2015-05-17 Thread Valentin Haenel
== Announcing bcolz 0.9.0 == What's new == This is mostly a smallish feature and bugfix release. One large topic was implementing 'addcol' and 'delcol' to properly handle on-disk tables. 'addcol' now has a new keyword argument 'move' that allows

[Numpy-discussion] [ANN] python-blosc v1.2.5

2015-04-15 Thread Valentin Haenel
= Announcing python-blosc 1.2.5 = What is new? This release contains support for Blosc v1.5.4 including changes to how the GIL is kept. This was required because Blosc was refactored in the v1.5.x line to remove global

[Numpy-discussion] webinterface down

2015-07-06 Thread Valentin Haenel
Hi, the webinterface at: http://mail.scipy.org/mailman/listinfo/numpy-discussion seems down for me. For anyone else too? V- ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] webinterface down

2015-07-06 Thread Valentin Haenel
It's working again, thanks. * Matthew Brett matthew.br...@gmail.com [2015-07-06]: Hi, On Mon, Jul 6, 2015 at 7:35 PM, Valentin Haenel valen...@haenel.co wrote: Hi, the webinterface at: http://mail.scipy.org/mailman/listinfo/numpy-discussion seems down for me. For anyone else too