mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-05-14 11:33:42 +02:00
Restored JSON output of dicts with non-string keys (#179)
* Restored JSON output of dicts with non-string keys * Use numpy.integer instead of deprecated numpy.int
This commit is contained in:
parent
a5b6f69160
commit
81e4f37934
2 changed files with 29 additions and 7 deletions
|
@ -249,6 +249,10 @@ def test_json_dict_io():
|
|||
with pytest.raises(Exception):
|
||||
jsonio.dump_dict_to_json(od, fname, description=desc)
|
||||
|
||||
od = {1: 'test', False: 'True', None: 'None'}
|
||||
jsonio.dump_dict_to_json(od, fname, description={np.int64(1): np.float64(2.444444)})
|
||||
jsonio.dump_dict_to_json(od, fname, description=np.float32(2.444444))
|
||||
|
||||
os.remove(fname + '.json.gz')
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue