Download Latest Version Patch v0.40.1 source code.tar.gz (8.9 MB)
Email in envelope

Get an email when there's a new version of DocArray

Home / v0.39.1
Name Modified Size InfoDownloads / Week
Parent folder
Patch v0.39.1 source code.tar.gz 2023-10-23 8.8 MB
Patch v0.39.1 source code.zip 2023-10-23 9.1 MB
README.md 2023-10-23 1.3 kB
Totals: 3 Items   17.9 MB 0

Release Note (0.39.1)

Release time: 2023-10-23 08:56:38

This release contains 2 bug fixes.

🐞 Bug Fixes

From_dataframe with numpy==1.26.1 (#1823)

A recent update to numpy has changed some of the versioning semantics, breaking DocArray's from_dataframe() method in some cases where the dataframe contains a numpy array. This has now been now fixed.

:::python
class MyDoc(BaseDoc):
    embedding: NdArray
    text: str

da = DocVec[MyDoc](
    [
        MyDoc(
            embedding=[1, 2, 3, 4],
            text='hello',
        ),
        MyDoc(
            embedding=[5, 6, 7, 8],
            text='world',
        ),
    ],
    tensor_type=NdArray,
)
df_da = da.to_dataframe()
# This broke before and is now fixed
da2 = DocVec[MyDoc].from_dataframe(df_da, tensor_type=NdArray)

Type handling in python 3.9 (#1823)

Starting with Python 3.9, Optional.__args__ is not always available, leading to some compatibility problems. This has been fixed by using the typing.get_args helper.

🤟 Contributors

We would like to thank all contributors to this release: - Johannes Messner (@JohannesMessner )

Source: README.md, updated 2023-10-23