You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems that ttb.tensor only supports creating a tensor from a numpy array. Is there any reason it cannot create a tensor directly from a Python array?
Also, I'm not sure where the creation is clearly documented. I sort of inferred that it had to be a numpy array, but it's not clearly stated nor is there any example where you specify a simple tensor like this one.
The text was updated successfully, but these errors were encountered:
I see the potential additional user friendliness to the later. Will share some thoughts but I'd be interested to hear Danny's thoughts on it.
A python list is effectively a list of pointers so it can be a collection of arbitrary types, and isn't contiguous in memory. Internally we'd have to convert to a numpy array, and make a decision about when to complain that the conversion isn't appropriately accurate. If we do make this move we can probably generate a utility to help for it, and we'd want to push that interface change out across the project, since right now I think for all numeric containers we've be requiring numpy arrays as the defacto python standard.
As for the documentation can you clarify what you were looking at? help(ttb.tensor) vs https://pyttb.readthedocs.io/en/latest/tensor.html we do have types in the signature, and a very basic example where we provide a numpy array to construct a tensor. But I'm not sure where a new user looks first.
It seems that ttb.tensor only supports creating a tensor from a numpy array. Is there any reason it cannot create a tensor directly from a Python array?
Right now, the user has to type the following:
I'm suggesting instead that the following should be possible:
Also, I'm not sure where the creation is clearly documented. I sort of inferred that it had to be a numpy array, but it's not clearly stated nor is there any example where you specify a simple tensor like this one.
The text was updated successfully, but these errors were encountered: