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
* 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
* 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
* 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 if
Hi,
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 type 'f8' and without fieldname:
dt = [(f8, f8)]
dty
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 you will need to specify your own encoding/decoding for more
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)
On 12 Dec 2014 23:22, Valentin Haenel valen...@haenel.co wrote:
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
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
On Wed, Dec 10, 2014 at 8:26 PM, Valentin Haenel valen...@haenel.co wrote:
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,
10 matches
Mail list logo