surfa.transform.cast_affine#

surfa.transform.cast_affine(obj, allow_none=True, copy=False)#

Cast object to Affine transform.

Parameters
  • obj (any) – Object to cast.

  • allow_none (bool) – Allow for None to be successfully passed and returned by cast.

  • copy (bool) – Return copy of object if type already matches.

Returns

Casted affine transform.

Return type

Affine or None