On Wed, Oct 11, 2023 at 11:50 PM Aaron Meurer wrote:
> Is there a way to make pickle not depend on the specific submodule
> that a class is defined in?
No. `Unpickler` somehow has to locate the class/reconstruction function. It
will have to use the name given by the `__reduce_ex__` during
Is there a way to make pickle not depend on the specific submodule
that a class is defined in? Wouldn't this happen again if you ever
decided to rename _core.
The underscores in numpy._core._reconstruct don't actually do anything
here in terms of making the interface not public, and if anything,
On Wed, Oct 11, 2023 at 4:24 PM Mateusz Sokol wrote:
> Hi! Thank you for all your feedback this week!
>
> We have made a decision to take a less disruptive option that we
> considered and that came up in this discussion.
>
> We back out of the `NumpyUnpickler` class solution for reading pickles
Hi! Thank you for all your feedback this week!
We have made a decision to take a less disruptive option that we considered
and that came up in this discussion.
We back out of the `NumpyUnpickler` class solution for reading pickles
across major NumPy versions.
Instead, we will retain
On Tue, Oct 10, 2023 at 7:03 AM Ronald van Elburg <
r.a.j.van.elb...@hetnet.nl> wrote:
> I have one more useCase to consider from our ecosystem.
>
> We dump numpy arrays into a MongoDB using GridFS for subsequent
> visualization, some snippets:
>
> '''Python
> with BytesIO() as BIO:
>
I have one more useCase to consider from our ecosystem.
We dump numpy arrays into a MongoDB using GridFS for subsequent visualization,
some snippets:
'''Python
with BytesIO() as BIO:
np.save(BIO, numpy_array)
serialized_A = BIO.getvalue()
filehandle_id =
On Mon, 9 Oct 2023 at 23:12, Nathan wrote:
> On Mon, Oct 9, 2023 at 3:58 PM Oscar Benjamin
> wrote:
>>
>> On Mon, 9 Oct 2023 at 22:30, Nathan wrote:
>> >
>> > On Mon, Oct 9, 2023 at 3:12 PM Oscar Benjamin
>> > wrote:
>> >>
>> >> I guess that makes it possible in some way to convert formats
On Mon, Oct 9, 2023 at 3:58 PM Oscar Benjamin
wrote:
> On Mon, 9 Oct 2023 at 22:30, Nathan wrote:
> >
> > On Mon, Oct 9, 2023 at 3:12 PM Oscar Benjamin <
> oscar.j.benja...@gmail.com> wrote:
> >>
> >> On Mon, 9 Oct 2023 at 21:57, Nathan wrote:
> >> >
> >> > On Mon, Oct 9, 2023 at 2:44 PM Oscar
On Mon, Oct 9, 2023 at 2:29 PM Nathan wrote:
> However, one thing we can do now is, for that one particular symbol that
> we know is going to be in every pickle file and probably never elsewhere,
> is intercept that one import and instead of generating a generic warning
> about np.core being
On Mon, 9 Oct 2023 at 22:30, Nathan wrote:
>
> On Mon, Oct 9, 2023 at 3:12 PM Oscar Benjamin
> wrote:
>>
>> On Mon, 9 Oct 2023 at 21:57, Nathan wrote:
>> >
>> > On Mon, Oct 9, 2023 at 2:44 PM Oscar Benjamin
>> > wrote:
>> >> Suppose that there is NumPy v1 and that in future there will be
On Mon, Oct 9, 2023 at 3:12 PM Oscar Benjamin
wrote:
> On Mon, 9 Oct 2023 at 21:57, Nathan wrote:
> >
> > On Mon, Oct 9, 2023 at 2:44 PM Oscar Benjamin <
> oscar.j.benja...@gmail.com> wrote:
> >> Suppose that there is NumPy v1 and that in future there will be NumPy
> >> v2. Also suppose that
On Mon, 9 Oct 2023 at 21:57, Nathan wrote:
>
> On Mon, Oct 9, 2023 at 2:44 PM Oscar Benjamin
> wrote:
>> Suppose that there is NumPy v1 and that in future there will be NumPy
>> v2. Also suppose that there will be two NumPy pickle formats fmtA and
>> a future fmtB. One possibility is that NumPy
On Mon, Oct 9, 2023 at 2:44 PM Oscar Benjamin
wrote:
> On Mon, 9 Oct 2023 at 17:03, Nathan wrote:
> >
> > On Mon, Oct 9, 2023 at 12:57 AM Aaron Meurer wrote:
> >>
> >> Is it possible to convert a NumPy 1 pickle file into a generic pickle
> >> file that works in both NumPy 1 and 2? As far as I
On Mon, 9 Oct 2023 at 17:03, Nathan wrote:
>
> On Mon, Oct 9, 2023 at 12:57 AM Aaron Meurer wrote:
>>
>> Is it possible to convert a NumPy 1 pickle file into a generic pickle
>> file that works in both NumPy 1 and 2? As far as I understand, pickle
>> is Turing complete, so I imagine it should be
On Mon, Oct 9, 2023 at 12:57 AM Aaron Meurer wrote:
> Is it possible to convert a NumPy 1 pickle file into a generic pickle
> file that works in both NumPy 1 and 2? As far as I understand, pickle
> is Turing complete, so I imagine it should be theoretically possible,
> but I don't know how easy
OK. Then we will just weight for 2.x and test then.
___
NumPy-Discussion mailing list -- numpy-discussion@python.org
To unsubscribe send an email to numpy-discussion-le...@python.org
https://mail.python.org/mailman3/lists/numpy-discussion.python.org/
Is it possible to convert a NumPy 1 pickle file into a generic pickle
file that works in both NumPy 1 and 2? As far as I understand, pickle
is Turing complete, so I imagine it should be theoretically possible,
but I don't know how easy it would be to actually do this or how it
would affect the
I don’t think this will be a problem for using pickle for IPC.
For the python multiprocessing module, all processes would be running the
same numpy version, so there wouldn’t be a problem.
It could be an issue if pickle is used to communicate numpy arrays between
a subset of workers running
If needed I can try to construct a minimal example for testing purposes.
___
NumPy-Discussion mailing list -- numpy-discussion@python.org
To unsubscribe send an email to numpy-discussion-le...@python.org
Our Numpy arrays are pickled when they are transported over Pipes between
Processors (using multiprocessing). Just to point out that there uses of
pickling not involving files. Would that affect your analysis?
___
NumPy-Discussion mailing list --
20 matches
Mail list logo