Skip to content

Commit 7a3dc24

Browse files
authored
Merge pull request #104 from LemurPwned/fix/import-fixes
Fix/import fixes
2 parents 22b53e8 + 5f9fe9a commit 7a3dc24

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

docker/Dockerfile.wheel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ COPY third_party /scratch/third_party
1515
COPY cmtj /scratch/cmtj
1616

1717
RUN python3 -m setup bdist_wheel && \
18-
python3 -m pip install dist/*.whl numpy scipy tqdm
18+
python3 -m pip install dist/*.whl numpy==1.26.4 scipy==1.13.1 tqdm==4.67.1 sympy==1.12
1919

2020
WORKDIR /app
2121
RUN python3 -c "import cmtj; from cmtj.utils import FieldScan" && \

python/cmtj.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@ PYBIND11_MODULE(cmtj, m) {
118118
.def("__getitem__",
119119
[](const DVector& v, const int key) { return v[key]; })
120120
.def("__len__", [](const DVector& v) { return 3; })
121-
.def("__str__", [](const DVector& v) { return v.toString(); })
122-
.def("__repr__", [](const DVector& v) { return v.toString(); })
121+
.def("__str__", py::overload_cast<>(&DVector::toString))
122+
.def("__repr__", py::overload_cast<>(&DVector::toString))
123123
.def_static("fromSpherical", &DVector::fromSpherical, "theta"_a, "phi"_a, "r"_a = 1.0);
124124

125125
py::implicitly_convertible<std::list<double>, DVector>();

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ def find_stubs(path: Path):
151151
*find_stubs(path=Path("cmtj")),
152152
]
153153
},
154-
setup_requires=["pybind11>=2.6.1"],
154+
setup_requires=["pybind11>=2.6.1,<3.0.0"],
155155
cmdclass={"build_ext": BuildExt},
156156
zip_safe=False,
157157
)

0 commit comments

Comments
 (0)