IdentityMatrix¶
Create a two-dimensional array that is an identity matrix, optionally with a shifted diagonal.
The node supports alternative compute backends, which can be used to speed up processing. More Info... Version 1.0.0
Ports/Properties¶
array¶
Output array.
like¶
Optional template array.
rows¶
Number of rows.
columns¶
Optionally the number of columns, if different from rows.
offset¶
Optional offset of the diagonal from the main diagonal. A positive value places the diagonal above the main diagonal, and a negative value places it below the main diagonal.
backend¶
Optional compute backend to use. Keep is the current default, which resolves to that of the template array if one is provided and otherwise numpy unless overridden. Numpy is the standard CPU backend that underpins most of NeuroPype's operations. The others require one or more GPUs to be present on the system, except for torch-cpu. For best performance, keep all arrays that interact with each other (via processing nodes) on the same backend.
precision¶
Numeric precision to use. Keep resolves to the precision of the template array if one is provided, and otherwise to the current default (usually 64-bit). Can be reduced to save memory (e.g. if running on GPU).
set_breakpoint¶
Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.
metadata¶
User-definable meta-data associated with the node. Usually reserved for technical purposes.