Skip to content

← array package

CreateArray

Create an array from the given input values.

The value type will generally be inferred from the input values, and will typically be the least flexible type that can represent all the input values (object in the case where the inputs are of otherwise irreconcilable types). One may also force a specific type by settin gthe precision argument to a specific value (e.g., float64). Note that, if all inputs are (possibly nested) lists of compatible size, the result will be a 2 or higher dimensional array where the lists appear stacked along the first axis, and where the data type is again the least flexible type that can represent all the list elements. However, if the lists are of different sizes, the result will be a 1D array of object type and containing the lists as elements. Version 0.9.0

Ports/Properties

array

Output array.

  • verbose name: Array
  • default value: None
  • port type: DataPort
  • value type: AnyNumeric (can be None)
  • data direction: OUT

in1

Input 1.

  • verbose name: In1
  • default value: None
  • port type: DataPort
  • value type: object (can be None)
  • data direction: IN

in2

Input 2.

  • verbose name: In2
  • default value: None
  • port type: DataPort
  • value type: object (can be None)
  • data direction: IN

in3

Input 3.

  • verbose name: In3
  • default value: None
  • port type: DataPort
  • value type: object (can be None)
  • data direction: IN

in4

Input 4.

  • verbose name: In4
  • default value: None
  • port type: DataPort
  • value type: object (can be None)
  • data direction: IN

in5

Input 5.

  • verbose name: In5
  • default value: None
  • port type: DataPort
  • value type: object (can be None)
  • data direction: IN

in6

Input 6.

  • verbose name: In6
  • default value: None
  • port type: DataPort
  • value type: object (can be None)
  • data direction: IN

in7

Input 7.

  • verbose name: In7
  • default value: None
  • port type: DataPort
  • value type: object (can be None)
  • data direction: IN

in8

Input 8.

  • verbose name: In8
  • default value: None
  • port type: DataPort
  • value type: object (can be None)
  • data direction: IN

in9

Input 9.

  • verbose name: In9
  • default value: None
  • port type: DataPort
  • value type: object (can be None)
  • data direction: IN

inN

Additional inputs.. .

  • verbose name: Inn
  • default value: None
  • port type: DataPort
  • value type: list (can be None)
  • data direction: IN

require_contiguous

Require that inputs are wired in or assigned in contiguous fashion. This means, if you skip some arguments, you get an error.

  • verbose name: Require Contiguous
  • default value: False
  • port type: BoolPort
  • value type: bool (can be None)

skip_none

Skip None inputs. This will implicitly filter out any arguments that had a None value.

  • verbose name: Skip None
  • default value: True
  • port type: BoolPort
  • value type: bool (can be None)

none_if_empty

Output None if the resulting list would be empty. None is sometimes used as a Null value in NeuroPype.

  • verbose name: Output None If List Empty
  • default value: False
  • port type: BoolPort
  • value type: bool (can be None)

verbose

Enable verbose output.

  • verbose name: Verbose
  • default value: False
  • port type: BoolPort
  • value type: bool (can be None)

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.

  • verbose name: Backend
  • default value: keep
  • port type: EnumPort
  • value type: str (can be None)

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).

  • verbose name: Precision
  • default value: keep
  • port type: EnumPort
  • value type: str (can be None)

in0

Input 0.

  • verbose name: In0
  • default value: None
  • port type: DataPort
  • value type: object (can be None)
  • data direction: IN

set_breakpoint

Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

  • verbose name: Set Breakpoint (Debug Only)
  • default value: False
  • port type: BoolPort
  • value type: bool (can be None)

metadata

User-definable meta-data associated with the node. Usually reserved for technical purposes.

  • verbose name: Metadata
  • default value: {}
  • port type: DictPort
  • value type: dict (can be None)