Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit bad0359

Browse files
committed
masked type conversion
1 parent 2d23b43 commit bad0359

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

plotly/utils.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,9 @@ def numpyJSONEncoder(self, obj):
101101
if not _numpy_imported:
102102
raise NotEncodable
103103

104+
if obj is numpy.ma.core.masked:
105+
return float('nan')
106+
104107
if type(obj).__module__.split('.')[0] == numpy.__name__:
105108
l = obj.tolist()
106109
try:

0 commit comments

Comments
 (0)