Skip to content

[Bug] Missing documentation on creation of ndarray for serialization #245

Open
@SID262000

Description

@SID262000

Is this a new bug?

  • I believe this is a new bug
  • I have searched the existing issues, and I could not find an existing issue for this bug

Current Behavior

The below line of code throws an error Type Error expected ndarray for serialization.

embeddings = model.encode(sentences)
embeddings.shape

Expected Behavior

We simply need to convert the model encoding to a list, which will resolve the above array.

Steps To Reproduce

Modify embeddings = model.encode(sentences) to embeddings = model.encode(sentences).tolist()

Relevant log output

No response

Environment

- **OS**:
- **Language version**:
- **Pinecone client version**:

Additional Context

Here's the link to the page which references the above issue: https://www.pinecone.io/learn/series/nlp/dense-vector-embeddings-nlp/

I'm happy to work on this issue and update the documentation as well, feel free to assign it to me

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions