You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Including Common changes for Multidimensional array (#2120)
* Including Common changes for 3d numpy
* Updating comments and multidimension
* Updating the test case name
* Updated the api names and test cases
* Updated code review comments.
* consistency in description of arb waveform
Copy file name to clipboardExpand all lines: build/templates/session.py/numpy_write_method.py.mako
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -30,6 +30,8 @@
30
30
raise TypeError('${parameter['python_name']} must be in C-order')
31
31
if ${parameter['python_name']}.dtype is not numpy.dtype('${parameter['numpy_type']}'):
32
32
raise TypeError('${parameter['python_name']} must be numpy.ndarray of dtype=${parameter['numpy_type']}, is ' + str(${parameter['python_name']}.dtype))
33
+
if ${parameter['python_name']}.ndim != ${parameter['array_dimension']}:
34
+
raise TypeError('${parameter['python_name']} must be numpy.ndarray of dimension=${parameter['array_dimension']}, is ' + str(${parameter['python_name']}.ndim))
33
35
% endfor
34
36
%for p in helper.filter_parameters(parameters, helper.ParameterUsageOptions.INTERPRETER_METHOD_CALL):
'ctypes_method_call_snippet': 'None if custom_type_without_struct_prefix_output_ctype is None else (ctypes.pointer(custom_type_without_struct_prefix_output_ctype))',
0 commit comments