bqn-npy/tests.bqn
2023-10-04 17:21:45 +02:00

30 lines
761 B
BQN
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

SaveNpy,LoadNpy•Import"npy.bqn"
floatArr23•rand.Range 0
intArr50-˜23•rand.Range 100
uintArr23•rand.Range 100
"test_float.npy"SaveNpy floatArr
"test_int.npy"SaveNpy intArr
"test_uint.npy"SaveNpy uintArr
! floatArrLoadNpy"test_float.npy"
! intArrLoadNpy"test_int.npy"
! uintArrLoadNpy"test_uint.npy"
# Supported dtypes
ref2340
! refLoadNpy"test<f8.npy"
! refLoadNpy"test<i4.npy"
! refLoadNpy"test<u4.npy"
# Unsupported dtypes, should raise an error
! LoadNpy1"test<f4.npy"
! LoadNpy1"test<i8.npy"
! LoadNpy1"test<u8.npy"
! LoadNpy1"test>f4.npy"
! LoadNpy1"test>f8.npy"
! LoadNpy1"test>i4.npy"
! LoadNpy1"test>i8.npy"
! LoadNpy1"test>u4.npy"
! LoadNpy1"test>u8.npy"