<p dir="ltr">On Mar 13, 2015 7:22 AM, "Daniel Smith" <<a href="mailto:dgasmith@icloud.com">dgasmith@icloud.com</a>> wrote:<br>
><br>
> Greetings everyone,<br>
> I have a new project that deals with core and disk tensors wrapped into a single object so that the expressions are transparent to the user after the tensor is formed. I would like to add __array_interface__ to the core tensor and provide a reasonable error message if someone tries to call the __array_interface__ for a disk tensor. I may be missing something, but I do not see an obvious way to do this in the python layer.</p>
<p dir="ltr">Just define your class so that attempting to access __array_interface__ raises an error directly:</p>
<p dir="ltr">class DiskTensor(object):<br>
    @property<br>
    def __array_interface__(self):<br>
        raise TypeError(...)</p>
<p dir="ltr">-n</p>