Skip to content

PyBind Segmentation Fault #22

@holmesco

Description

@holmesco

Hi,

I am hoping to use your repo in part of my research. I installed it according to the instructions on the README. The C++ tests are passing, but when I tried to run the Python example, I got a seg fault. I can reproduce the issue by calling to the Euclidean Distance invariant function as shown below:

import numpy as np
import clipperpy

if __name__ == "__main__":
    iparams = clipperpy.invariants.EuclideanDistanceParams()
    iparams.sigma = 0.01
    iparams.epsilon = 0.02
    invariant = clipperpy.invariants.EuclideanDistance(iparams)
    
    d1 = np.array([[1.0,2.0,3.0]]).T.astype(np.float64)
    d2 = np.array([[1.0,2.0,3.0]]).T.astype(np.float64)
    d3 = np.array([[1.0,2.0,3.0]]).T.astype(np.float64)
    d4 = np.array([[1.0,2.0,3.0]]).T.astype(np.float64)
        
    scr = invariant(d1, d2, d3, d4)

The seg fault occurs when "invariant" is called.

I am running everything in a container, but I don't think that this should be causing the problem. Could you let me know the versions that you are using to get a working version of the python code (e.g., pybind11, python, cmake, etc.)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions