is_contiguous¶
- metatensor.is_contiguous(tensor: TensorMap) bool[source]¶
 Checks whether all values arrays and gradients values arrays (if present) in all
TensorBlockof an inputTensorMapare contiguous.Note that arrays of
Labelsobjects are not checked for contiguity.
- metatensor.is_contiguous_block(block: TensorBlock) bool[source]¶
 Checks whether the values array and gradients values arrays (if present) of an input
TensorBlockare contiguous.Note that arrays of
Labelsobjects are not checked for contiguity.- Parameters:
 block (TensorBlock) – the input
TensorBlock.- Returns:
 bool, true if all values arrays contiguous, false otherwise.
- Return type: