mirror of
https://github.com/p2p-ld/numpydantic.git
synced 2025-01-09 05:34:27 +00:00
add types to the ndarray type collection key
This commit is contained in:
parent
8bf2203911
commit
a02d9b2d9c
1 changed files with 2 additions and 2 deletions
|
@ -120,7 +120,7 @@ class SubscriptableMeta(ABCMeta):
|
|||
new type is returned for every unique set of arguments.
|
||||
"""
|
||||
|
||||
_all_types: Dict[Tuple[type, Tuple[Any, ...]], type] = {}
|
||||
_all_types: Dict[Tuple[type, Tuple[Any, ...], tuple[type, ...]], type] = {}
|
||||
_parameterized: bool = False
|
||||
|
||||
@abstractmethod
|
||||
|
@ -160,7 +160,7 @@ class SubscriptableMeta(ABCMeta):
|
|||
def _create_type(
|
||||
cls, args: Tuple[Any, ...], additional_values: Dict[str, Any]
|
||||
) -> type:
|
||||
key = (cls, args)
|
||||
key = (cls, args, tuple(type(a) for a in args))
|
||||
if key not in cls._all_types:
|
||||
cls._all_types[key] = type(
|
||||
cls.__name__,
|
||||
|
|
Loading…
Reference in a new issue