GitHub user justincui edited a comment on the discussion: the pyfury demo code
shown in the website doesn't work with pyfury :(
with the following setting:
```
python --version
Python 3.9.16
pip list
Package Version
----------- -------
cloudpickle 3.0.0
numpy 1.26.4
pip 24.1.1
pyarrow 14.0.2
pyfury 0.4.1
setuptools 53.0.0
```
The following code can be run:
```
import pyfury
import numpy as np
fury = pyfury.Fury()
object_list = [True, False, "str", -1.1, 1,
np.full(100, 0, dtype=np.int32), np.full(20, 0.0,
dtype=np.double)]
data = fury.serialize(object_list)
# bytes can be data serialized by other languages.
new_list = fury.deserialize(data)
object_map = {"k1": "v1", "k2": object_list, "k3": -1}
data = fury.serialize(object_map)
# bytes can be data serialized by other languages.
new_map = fury.deserialize(data)
print(new_map)
```
but the following code still core dump:
```
Python 3.9.16 (main, Dec 8 2022, 00:00:00)
[GCC 11.3.1 20221121 (Red Hat 11.3.1-4)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from typing import Dict
>>> import pyfury
>>>
>>> class SomeClass:
... f1: "SomeClass"
... f2: Dict[str, str]
... f3: Dict[str, str]
...
>>> fury = pyfury.Fury(ref_tracking=True)
>>> fury.register_class(SomeClass)
>>> obj = SomeClass()
>>> obj.f2 = {"k1": "v1", "k2": "v2"}
>>> obj.f1, obj.f3 = obj, obj.f2
>>> data = fury.serialize(obj)
Segmentation fault (core dumped)
```
GitHub link:
https://github.com/apache/fury/discussions/1719#discussioncomment-9953030
----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]