datalad_next.constraints.EnsureDType

class datalad_next.constraints.EnsureDType(dtype)[source]

Bases: Constraint

Ensure that an input (or several inputs) are of a particular data type. .. rubric:: Examples

>>> c = EnsureDType(float)
>>> type(c(8))                  
float
>>> import numpy as np          
>>> c = EnsureDType(np.float64) 
>>> type(c(8))                  
numpy.float64
long_description()[source]

This method is deprecated. Use input_description instead

short_description()[source]

This method is deprecated. Use input_synopsis instead