microsoft / microsoft/qlib

numpy.ndarray size changed, may indicate binary incompatibility

Open
#255 9 comments 0 reactions 1 assignee View on GitHub

@Derek-Wds is already working on this.

Since Feb 3, 2021.

bug
Dominant language
Python
Stars
48.7k
Forks
7.7k
PR merge metrics
No merged PRs in 30d

Description

🐛 Bug Description

/opt/conda/lib/python3.7/site-packages/qlib/data/data.py in <module>
     18 from multiprocessing import Pool
     19 
---> 20 from .cache import H
     21 from ..config import C
     22 from .ops import Operators

/opt/conda/lib/python3.7/site-packages/qlib/data/cache.py in <module>
     34 from .base import Feature
     35 
---> 36 from .ops import Operators
     37 
     38 

/opt/conda/lib/python3.7/site-packages/qlib/data/ops.py in <module>
     17 
     18 try:
---> 19     from ._libs.rolling import rolling_slope, rolling_rsquare, rolling_resi
     20     from ._libs.expanding import expanding_slope, expanding_rsquare, expanding_resi
     21 except ImportError:

/opt/conda/lib/python3.7/site-packages/qlib/data/_libs/rolling.pyx in init qlib.data._libs.rolling()

ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 88 from C header, got 80 from PyObject

To Reproduce

Steps to reproduce the behavior:

  1. conda create --name test python=3.7
  2. pip install numpy cython pyqlib
  3. Run this example (https://github.com/microsoft/qlib/blob/main/examples/workflow_by_code.ipynb) in jupyter notebook

Expected Behavior

Should successfully run this example

Screenshot

image

Environment

Note: User could run cd scripts && python collect_info.py all under project directory to get system information
and paste them here directly.

  • Qlib version: 0.6.3
  • numpy version: 1.20.0
  • cython version: 0.29.21
  • Python version: 3.7.7
  • OS ( Linux):
  • Commit number (optional, please provide it if you are using the dev version):

Additional Notes

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.