optional_cuda_array_validator
- cubie.batchsolving._utils.optional_cuda_array_validator(instance: Any, attribute: Any, value: Any, dimensions: int | None = None) bool[source]
Validate that a value is
Noneor a CUDA array with optional checks.- Parameters:
instance – Instance containing the attribute (required by attrs, unused here).
attribute – Attribute metadata supplied by attrs.
value – Value provided for validation.
dimensions – Required dimensionality when provided.
- Returns:
TruewhenvalueisNoneor passescuda_array_validator().- Return type:
Notes
The
instanceandattributeparameters are accepted for attrs compatibility and are not used in the validation logic.