-
Notifications
You must be signed in to change notification settings - Fork 7
Closed
Labels
NumpyModelElements related to pydantic-numpy NumpyModelElements related to pydantic-numpy NumpyModelenhancementNew feature or requestNew feature or requestwontfixThis will not be worked onThis will not be worked on
Description
Hi, I am trying a composition of NumpyModels and finding that the .dump()
function does not work properly:
from pathlib import Path
from pydantic_numpy.model import NumpyModel
from pydantic import Field
import pydantic_numpy.typing as pnd
import numpy as np
class TestNumpy:
def test_compose(self) -> None:
class A(NumpyModel):
a: pnd.NpNDArray = Field(frozen=True)
class B(NumpyModel):
a: A = Field(frozen=True)
a = A(a=np.zeros((10, 10)))
b = B(a=a)
b.dump(Path.home(), "test")
Curious if it would be possible to support dumping models in models. Thanks!
Metadata
Metadata
Assignees
Labels
NumpyModelElements related to pydantic-numpy NumpyModelElements related to pydantic-numpy NumpyModelenhancementNew feature or requestNew feature or requestwontfixThis will not be worked onThis will not be worked on