|
|
0a39a2 |
From cf4aa744be67583acb14b4471101b2b3e011f718 Mon Sep 17 00:00:00 2001
|
|
|
0a39a2 |
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
|
|
0a39a2 |
Date: Sun, 24 Jan 2021 16:36:21 +0100
|
|
|
0a39a2 |
Subject: [PATCH] Use lowercase "float64" as numpy dtype
|
|
|
0a39a2 |
|
|
|
0a39a2 |
Float64 is gone with numpy 1.20:
|
|
|
0a39a2 |
|
|
|
0a39a2 |
>>> numpy.__version__
|
|
|
0a39a2 |
'1.19.4'
|
|
|
0a39a2 |
>>> [k for k in numpy.sctypeDict.keys() if str(k).lower().startswith('float')]
|
|
|
0a39a2 |
['float16', 'Float16', 'float32', 'Float32', 'float64', 'Float64', 'float128', 'Float128', 'float_', 'float']
|
|
|
0a39a2 |
|
|
|
0a39a2 |
>>> numpy.__version__
|
|
|
0a39a2 |
'1.20.0rc2'
|
|
|
0a39a2 |
>>> [k for k in numpy.sctypeDict.keys() if str(k).lower().startswith('float')]
|
|
|
0a39a2 |
['float16', 'float32', 'float64', 'float128', 'float_', 'float']
|
|
|
0a39a2 |
---
|
|
|
0a39a2 |
tables/atom.py | 2 +-
|
|
|
0a39a2 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
0a39a2 |
|
|
|
0a39a2 |
diff --git a/tables/atom.py b/tables/atom.py
|
|
|
0a39a2 |
index 81d37c5483..0a25ddf360 100644
|
|
|
0a39a2 |
--- a/tables/atom.py
|
|
|
0a39a2 |
+++ b/tables/atom.py
|
|
|
0a39a2 |
@@ -336,7 +336,7 @@ class Atom(metaclass=MetaAtom):
|
|
|
0a39a2 |
Traceback (most recent call last):
|
|
|
0a39a2 |
...
|
|
|
0a39a2 |
ValueError: unknown NumPy scalar type: 'S5'
|
|
|
0a39a2 |
- >>> Atom.from_sctype('Float64')
|
|
|
0a39a2 |
+ >>> Atom.from_sctype('float64')
|
|
|
0a39a2 |
Float64Atom(shape=(), dflt=0.0)
|
|
|
0a39a2 |
|
|
|
0a39a2 |
"""
|