X float16 support (#2406)

* float16 support

* fix type checks

* PR review comments

* add tests for custom json encoder; rename and comment for posterity

* lint

* typos
This commit is contained in:
Bruce Martin
2021-08-25 11:12:49 -07:00
committed by Colin Megill
parent eaae6df5e3
commit 154d099fef
8 changed files with 102 additions and 15 deletions
@@ -15,7 +15,7 @@ from backend.common.errors import (
UnsupportedSummaryMethod,
DatasetAccessError,
)
from backend.common.utils.utils import jsonify_numpy
from backend.common.utils.utils import jsonify_strict
from backend.common.fbs.matrix import encode_matrix_fbs
@@ -336,7 +336,7 @@ class DataAdaptor(metaclass=ABCMeta):
)
try:
return jsonify_numpy(result)
return jsonify_strict(result)
except ValueError:
raise JSONEncodingValueError("Error encoding differential expression to JSON")