ExtIndexObject#

class scqubits.core.namedslots_array.ExtIndexObject(idx_entry, parameters, slot=None)[source]#

Object used for enabling enhanced indexing in NamedSlotsNdarray. Handles a single idx_entry in multi-index

Methods

ExtIndexObject.__init__(idx_entry, parameters)

ExtIndexObject.convert_to_np_idx_entry(idx_entry)

Convert a generalized multi-index entry into a valid numpy multi-index entry, and returns that along with a str recording the idx_entry type

ExtIndexObject.convert_to_np_slice_entry(...)

Handles value-based slices, converting a float or complex value based entry into the corresponding position-based entry

Parameters
  • idx_entry (Union[int, integer, slice, Tuple[int], List[int], Tuple[int, integer], List[integer], Any, float, complex]) –

  • parameters (Parameters) –

  • slot (Optional[int]) –

convert_to_np_idx_entry(idx_entry)[source]#

Convert a generalized multi-index entry into a valid numpy multi-index entry, and returns that along with a str recording the idx_entry type

Return type

Tuple[str, Union[int, integer, slice, Tuple[int], List[int], Tuple[int, integer], List[integer], Any]]

Parameters

idx_entry (Union[int, integer, slice, Tuple[int], List[int], Tuple[int, integer], List[integer], Any, float, complex]) –

convert_to_np_slice_entry(slice_entry)[source]#

Handles value-based slices, converting a float or complex value based entry into the corresponding position-based entry

Return type

Union[int, integer, None]

Parameters

slice_entry (Union[int, integer, None, float, complex, str]) –