cf.Data.asdata¶
-
classmethod
Data.
asdata
(d, dtype=None, copy=False)[source]¶ Convert the input to a
Data
object.Parameters: - dtype: data-type, optional
By default, the data-type is inferred from the input data.
copy: TODO
Returns: Examples:
>>> d = cf.Data([1, 2]) >>> cf.Data.asdata(d) is d True >>> d.asdata(d) is d True
>>> cf.Data.asdata([1, 2]) <CF Data: [1, 2]>
>>> cf.Data.asdata(numpy.array([1, 2])) <CF Data: [1, 2]>