8000 Update misc.py (#420) · stan-dev/pystan2@3bf068b · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Mar 19, 2021. It is now read-only.

Commit 3bf068b

Browse files
JuanVeronariddell
authored andcommitted
Update misc.py (#420)
Fixes issue #419 that prompts a FutureWarning due to a numpy change (as can be seen in numpy/numpy#9505)
1 parent 4a47532 commit 3bf068b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pystan/misc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ def _split_data(data):
396396
for k, v in data.items():
397397
if np.issubdtype(np.asarray(v).dtype, np.integer):
398398
data_i.update({k.encode('utf-8'): np.asarray(v, dtype=int)})
399-
elif np.issubdtype(np.asarray(v).dtype, float):
399+
elif np.issubdtype(np.asarray(v).dtype, np.floating):
400400
data_r.update({k.encode('utf-8'): np.asarray(v, dtype=float)})
401401
else:
402402
msg = "Variable {} is neither int nor float nor list/array thereof"

0 commit comments

Comments
 (0)
0