Skip to content

Linux-AttributeError: module 'Ball._cball' has no attribute 'doubleArray_swiginit'  #4

@daiquanyu

Description

@daiquanyu

I successfully install the package in linux, but found the error while running the toy example provided in the code. Besides, I can successfully run the demo in windows.

The original code is as follows:


import Ball as ball
import numpy as np
import math

np.random.seed(2)

#%% both x, y are numeric vector
n = 50
error = np.random.uniform(-0.3, 0.3, n)
x = np.random.uniform(0, 4*math.pi, n)
y = np.cos(x) + error
a = ball.bcov_test(x, y)


The original log is as follows:


Traceback (most recent call last):
File "Ball_test.py", line 19, in
a = ball.bcov_test(x, y)
File "/home/daiquanyu/anaconda3/envs/reco_gpu/lib/python3.6/site-packages/Ball/bcov.py", line 102, in bcov_test
bcov_stat, bcov_pvalue = bcov_test_wrap_c(args[0], args[1], n, num_permutations, distance, num_thread)
File "/home/daiquanyu/anaconda3/envs/reco_gpu/lib/python3.6/site-packages/Ball/wrap_c.py", line 96, in bcov_test_wrap_c
bcov_stat = doubleArray(3)
File "/home/daiquanyu/anaconda3/envs/reco_gpu/lib/python3.6/site-packages/Ball/cball.py", line 69, in init
_cball.doubleArray_swiginit(self, _cball.new_doubleArray(nelements))
AttributeError: module 'Ball._cball' has no attribute 'doubleArray_swiginit'


Look forward to your reply. Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions