Skip to content

Conversion of np int64 and float64 to SWIG int and float #3866

Open
@mdouze

Description

@mdouze

Faiss does not transparently convert numpy int64 and float64 / float32 to SWIG's int and float

import faiss
import numpy as np

a = np.array([4, 6])

d = a[0]
faiss.IndexFlatL2(d) # fails 
faiss.IndexFlatL2(int(d)) # works

It should be possible to fix it with SWIG typemaps

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions