Ticket #254 (new defect)

Opened 22 months ago

Last modified 2 days ago

Errors with Numpy Dtypes

Reported by: cronburg@… Owned by: xi
Priority: normal Component: pyyaml
Severity: normal Keywords: pyyaml numpy dtype TypeError


Dumping / loading numpy floats works as expected, but it seems like most of the others fail:

import yaml import numpy as np yaml.load(yaml.dump(np.float64(10)))



Traceback (most recent call last):

File "<stdin>", line 1, in <module> File "/usr/local/lib/python2.7/site-packages/yaml/", line 202, in dump

return dump_all([data], stream, Dumper=Dumper, kwds)

File "/usr/local/lib/python2.7/site-packages/yaml/", line 190, in dump_all


File "/usr/local/lib/python2.7/site-packages/yaml/", line 28, in represent

node = self.represent_data(data)

File "/usr/local/lib/python2.7/site-packages/yaml/", line 61, in represent_data

node = self.yaml_multi_representers[data_type](self, data)

File "/usr/local/lib/python2.7/site-packages/yaml/", line 437, in represent_object

return self.represent_sequence(tag+function_name, args)

File "/usr/local/lib/python2.7/site-packages/yaml/", line 101, in represent_sequence

node_item = self.represent_data(item)

File "/usr/local/lib/python2.7/site-packages/yaml/", line 41, in represent_data

if self.ignore_aliases(data):

File "/usr/local/lib/python2.7/site-packages/yaml/", line 142, in ignore_aliases

if data in [None, ()]:

TypeError?: data type not understood


Change History

comment:1 Changed 2 days ago by maskodok <galihadiputro87@…>

The only thing more I could hope for is documentation of all these features (other than reading through the code).  Cipto Junaedy Is this in process? Can I help? About  Unit Link Terbaik di Indonesia Commonwealth Life Investra Link


Add a comment

Modify Ticket

Change Properties
<Author field>
as new
as The resolution will be set. Next status will be 'closed'
to The owner will be changed from xi. Next status will be 'new'
The owner will be changed from xi to anonymous. Next status will be 'assigned'

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.