cppyy
cppyy copied to clipboard
Different behavior on cpython and pypy interpreter.
The following code works on cpython (I only test it on 3.7). However, it doesn't work on pypy 3:
from cppyy.gbl.std import vector as Vector
import numpy as np
from array import array
x = Vector['int'](range(10))
x = Vector['int'](np.arange(10))
x = Vector['int'](array('i', range(10)))
Yes, unfortunately, the PyPy port is behind the CPython one and several more recent features are missing in the former. (Combo of development for PyPy being harder and more folks asking for CPython.)