Modify

Ticket #192 (new defect)

Opened 3 years ago

Last modified 2 days ago

ignore_aliases breaks with numy arrays

Reported by: barronh@… Owned by: xi
Priority: normal Component: pyyaml
Severity: normal Keywords:
Cc:

Description

With all numpy arrays except type double, yaml crashes with error below:

TypeError?: data type not understood

steps to reproduce: python -c "import yaml; yaml.load(yaml.dump(arange(12, dtype = 'i')))"

steps to correct: patch yaml/representer.py using attached file

It appears that None and tuple or handled in a separate line from all other types. This can be avoided using the NoneType? from types.

Is there some other reason that these two are handled out of line?

By changing the implementation, numpy arrays of all types can be dumped.

Attachments

representer.patch Download (518 bytes) - added by anonymous 3 years ago.

Change History

Changed 3 years ago by anonymous

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

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
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'
Author


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

 
Note: See TracTickets for help on using tickets.