Skip to content

Commit 7d51493

Browse files
committed
Merge pull request #252 in LCL/wolframclientforpython from bugfix/421399-zero-dim-array to master
* commit 'b3f51bea654d2aec80b6b41af8d8de9dc5ab3893': adding tests
2 parents 128d467 + b3f51be commit 7d51493

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

wolframclient/tests/serializers/wxf_numpy.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,13 @@ def test_numpy_integers(self):
224224
b"{65535, -2147483648, 0, -9223372036854775808, 18446744073709551615}",
225225
)
226226

227+
def test_scalars(self):
228+
for arr, result in (
229+
(numpy.array(1, dtype=numpy.int8), b"1"),
230+
(numpy.array(0.5, dtype=numpy.float32), b"0.5"),
231+
):
232+
self.assertEqual(export(arr), result)
233+
227234
def test_bad_options(self):
228235
with self.assertRaises(ValueError):
229236
NumPyWXFEncoder(packed_array_support=False, numeric_array_support=False)

0 commit comments

Comments
 (0)