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
We inconsistently use both core.NamedShape and dict for named shapes. We should unify and use core.NamedShape everywhere.
It is possible that NamedShape needs some work too. Let's track that separately. This issue is only about using a consistent type, which we can upgrade as needed.
A particular issue in the current situation: dicts are not hashable, whereas NamedShape is. Shape information is assumed to be hashable. For example, api.ShapeDtypeStruct hashes its named_shape attribute with the assumption that doing so is valid. But this simply errs and we haven't been testing it (TypeError: unhashable type: 'dict').
We inconsistently use both
core.NamedShape
and dict for named shapes. We should unify and usecore.NamedShape
everywhere.It is possible that
NamedShape
needs some work too. Let's track that separately. This issue is only about using a consistent type, which we can upgrade as needed.A particular issue in the current situation: dicts are not hashable, whereas
NamedShape
is. Shape information is assumed to be hashable. For example,api.ShapeDtypeStruct
hashes itsnamed_shape
attribute with the assumption that doing so is valid. But this simply errs and we haven't been testing it (TypeError: unhashable type: 'dict'
).cc @apaszke @jekbradbury
The text was updated successfully, but these errors were encountered: