tbplas.np_load_complex

tbplas.np_load_complex(file_name: str, transpose: bool = False, flatten: bool = False) ndarray

Load a double complex matrix from text file.

This functions assuming the real and complex parts are in contiguous columns, i.e., real(a(:,0)), imag(a(:,0)), real(a(:,1)), imag(a(:,1)), …

WARNING: DO NOT change the default value of arguments. Otherwise, A LOT OF functions will not work properly.

Parameters:
  • file_name – name of data file

  • transpose – whether to transpose the matrix

  • flatten – whether to flatten matrix with only 1 ROW or COLUMN to a ROW vector

Returns:

(num_rows, num_cols) complex128 matrix or ROW vector, depending on raw data shape and the ‘flatten’ parameter