material_array¶
-
class
array_collections.
material_array
[source]¶ Create an array that issues a RuntimeWarning when a non-positive or non-finite value is encountered.
Parameters
array: [array_like] Input data, in any form that can be converted to an array. This includes lists, lists of tuples, tuples, tuples of tuples, tuples of lists and ndarrays.
dtype: [data-type] By default, the data-type is inferred from the input data.
order: {‘C’, ‘F’} Whether to use row-major (C-style) or column-major (Fortran-style) memory representation. Defaults to ‘C’.
Examples
Create material_array:
>>> arr = material_array([1, 18]) material_array([1, 18])
A negative value issues a RuntimeWarning:
>>> arr[1] = -1 __main__:1: RuntimeWarning: Encountered negative or non-finite value in 'material_array' object.