Skip to content

Commit

Permalink
Array editor: Support float16 arrays.
Browse files Browse the repository at this point in the history
  • Loading branch information
jitseniesen committed Jun 27, 2016
1 parent 360f9c3 commit 2f5ebc9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions spyderlib/widgets/variableexplorer/arrayeditor.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
'double': '%.3f',
'float_': '%.3f',
'longfloat': '%.3f',
'float16': '%.3f',
'float32': '%.3f',
'float64': '%.3f',
'float96': '%.3f',
Expand Down Expand Up @@ -856,6 +857,9 @@ def test():
arr = np.array([1, 2, 3], dtype="int8")
assert_array_equal(arr, test_edit(arr, "int array"))

arr = np.zeros((5,5), dtype=np.float16)
assert_array_equal(arr, test_edit(arr, "float array"))

arr = np.zeros((3,3,4))
arr[0,0,0]=1
arr[0,0,1]=2
Expand Down

0 comments on commit 2f5ebc9

Please sign in to comment.