TensorPlay
latest (dev)
Copy
View Markdown

Latest development documentation · Updated 2026-10-15

tensorplay.typename

tensorplay.typename(obj: Any, /) → str[source]

String representation of the type of an object.

This function returns a fully qualified string representation of an object’s type. :param obj: The object whose type to represent :type obj: object

Returns:

the type of the object o

Return type:

str

Example

>>> x = tensorplay.tensor([1, 2, 3])
>>> tensorplay.typename(x)
'tensorplay.LongTensor'
>>> tensorplay.typename(tensorplay.nn.Parameter)
'tensorplay.nn.parameter.Parameter'

On this page

Ask DeepWiki