zcollection.variable.abc.Variable.duplicate#

Variable.duplicate(data)[source]#

Create a new variable from the properties of this instance and the data provided.

Parameters:
  • data (Any) – Variable data.

  • self (T) –

Returns:

New variable.

Raises:

ValueError – If the shape of the data does not match the shape of the stored data.

Return type:

T