Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: ‘class pybind11::dtype’ has no member named ‘type’; did you mean ‘dtype’? #54

Open
jiapei100 opened this issue Aug 9, 2021 · 3 comments

Comments

@jiapei100
Copy link

My ENV:

  • OS: Ubuntu 20.04
  • Python: 3.8.10
[ 97%] Linking CXX shared library numpyeigen_helpers.cpython-38-x86_64-linux-gnu.so
cd ....../numpyeigen/build/tests && /usr/bin/cmake -E cmake_link_script CMakeFiles/numpyeigen_helpers.dir/link.txt --verbose=1
/usr/local/bin/c++ -fPIC -O3 -DNDEBUG -shared -Wl,-soname,numpyeigen_helpers.cpython-38-x86_64-linux-gnu.so -o numpyeigen_helpers.cpython-38-x86_64-linux-gnu.so CMakeFiles/numpyeigen_helpers.dir/pybind11_helper_module.cpp.o  -flto 
....../numpyeigen/build/tests/matrix_add.out.cpp: In lambda function:
....../numpyeigen/build/tests/matrix_add.out.cpp:61:112: error: ‘class pybind11::dtype’ has no member named ‘type’; did you mean ‘dtype’?
   61 | const char _NPE_PY_BINDING_b_type_s = npe::detail::transform_typechar(static_cast<pybind11::array&>(b).dtype().type());
      |                                                                                                                ^~~~
      |                                                                                                                dtype
....../numpyeigen/build/tests/matrix_add.out.cpp:75:112: error: ‘class pybind11::dtype’ has no member named ‘type’; did you mean ‘dtype’?
   75 | const char _NPE_PY_BINDING_a_type_s = npe::detail::transform_typechar(static_cast<pybind11::array&>(a).dtype().type());
      |                                                                                                                ^~~~
      |                                                                                                                dtype
....../numpyeigen/build/tests/default_arg.out.cpp: In lambda function:
....../numpyeigen/build/tests/default_arg.out.cpp:39:112: error: ‘class pybind11::dtype’ has no member named ‘type’; did you mean ‘dtype’?
   39 | const char _NPE_PY_BINDING_a_type_s = npe::detail::transform_typechar(static_cast<pybind11::array&>(a).dtype().type());
      |                                                                                                                ^~~~
      |                                                                                                                dtype
....../numpyeigen/build/tests/default_arg.out.cpp:53:112: error: ‘class pybind11::dtype’ has no member named ‘type’; did you mean ‘dtype’?
   53 | const char _NPE_PY_BINDING_c_type_s = npe::detail::transform_typechar(static_cast<pybind11::array&>(c).dtype().type());
      |                                                                                                                ^~~~
      |                                                                                                                dtype
....../numpyeigen/build/tests/string_expr_docstring.out.cpp: In lambda function:
....../numpyeigen/build/tests/string_expr_docstring.out.cpp:26:112: error: ‘class pybind11::dtype’ has no member named ‘type’; did you mean ‘dtype’?
   26 | const char _NPE_PY_BINDING_a_type_s = npe::detail::transform_typechar(static_cast<pybind11::array&>(a).dtype().type());
      |                                                                                                                ^~~~
      |                                                                                                                dtype
....../numpyeigen/build/tests/function_1d.out.cpp: In lambda function:
....../numpyeigen/build/tests/function_1d.out.cpp:25:112: error: ‘class pybind11::dtype’ has no member named ‘type’; did you mean ‘dtype’?
   25 | const char _NPE_PY_BINDING_v_type_s = npe::detail::transform_typechar(static_cast<pybind11::array&>(v).dtype().type());
      |                                                                                                                ^~~~
      |                                                                                                                dtype
....../numpyeigen/build/tests/function_1d.out.cpp:39:112: error: ‘class pybind11::dtype’ has no member named ‘type’; did you mean ‘dtype’?
   39 | const char _NPE_PY_BINDING_f_type_s = npe::detail::transform_typechar(static_cast<pybind11::array&>(f).dtype().type());
      |                                                                                                                ^~~~
      |                                                                                                                dtype
....../numpyeigen/build/tests/function_1d.out.cpp:53:112: error: ‘class pybind11::dtype’ has no member named ‘type’; did you mean ‘dtype’?
   53 | const char _NPE_PY_BINDING_p_type_s = npe::detail::transform_typechar(static_cast<pybind11::array&>(p).dtype().type());
      |                                                                                                                ^~~~
      |                                                                                                                dtype
....../numpyeigen/build/tests/mutate_matrix.out.cpp: In lambda function:
....../numpyeigen/build/tests/mutate_matrix.out.cpp:22:112: error: ‘class pybind11::dtype’ has no member named ‘type’; did you mean ‘dtype’?
   22 | const char _NPE_PY_BINDING_a_type_s = npe::detail::transform_typechar(static_cast<pybind11::array&>(a).dtype().type());
      |                                                                                                                ^~~~
      |                                                                                                                dtype
....../numpyeigen/build/tests/bool_arg.out.cpp: In lambda function:
....../numpyeigen/build/tests/bool_arg.out.cpp:33:112: error: ‘class pybind11::dtype’ has no member named ‘type’; did you mean ‘dtype’?
   33 | const char _NPE_PY_BINDING_a_type_s = npe::detail::transform_typechar(static_cast<pybind11::array&>(a).dtype().type());
      |                                                                                                                ^~~~
      |                                                                                                                dtype
....../numpyeigen/build/tests/sparse_like.out.cpp: In lambda function:
....../numpyeigen/build/tests/sparse_like.out.cpp:55:112: error: ‘class pybind11::dtype’ has no member named ‘type’; did you mean ‘dtype’?
   55 | const char _NPE_PY_BINDING_a_type_s = npe::detail::transform_typechar(static_cast<pybind11::array&>(a).dtype().type());
      |                                                                                                                ^~~~
      |                                                                                                                dtype
....../numpyeigen/build/tests/bool_arg.out.cpp:47:112: error: ‘class pybind11::dtype’ has no member named ‘type’; did you mean ‘dtype’?
   47 | const char _NPE_PY_BINDING_b_type_s = npe::detail::transform_typechar(static_cast<pybind11::array&>(b).dtype().type());
      |                                                                                                                ^~~~
      |                                                                                                                dtype
....../numpyeigen/build/tests/sparse_like.out.cpp:69:114: error: ‘class pybind11::dtype’ has no member named ‘type’; did you mean ‘dtype’?
   69 | const char _NPE_PY_BINDING_b_type_s = npe::detail::transform_typechar(static_cast<npe::sparse_array&>(b).dtype().type());
      |                                                                                                                  ^~~~
      |                                                                                                                  dtype
....../numpyeigen/build/tests/sparse_matrix_add.out.cpp: In lambda function:
....../numpyeigen/build/tests/sparse_matrix_add.out.cpp:23:114: error: ‘class pybind11::dtype’ has no member named ‘type’; did you mean ‘dtype’?
   23 | const char _NPE_PY_BINDING_a_type_s = npe::detail::transform_typechar(static_cast<npe::sparse_array&>(a).dtype().type());
      |                                                                                                                  ^~~~
      |                                                                                                                  dtype
....../numpyeigen/build/tests/sparse_matrix_add.out.cpp:37:114: error: ‘class pybind11::dtype’ has no member named ‘type’; did you mean ‘dtype’?
   37 | const char _NPE_PY_BINDING_b_type_s = npe::detail::transform_typechar(static_cast<npe::sparse_array&>(b).dtype().type());
      |                                                                                                                  ^~~~
      |                                                                                                                  dtype
....../numpyeigen/build/tests/default_matches.out.cpp: In lambda function:
....../numpyeigen/build/tests/default_matches.out.cpp:70:112: error: ‘class pybind11::dtype’ has no member named ‘type’; did you mean ‘dtype’?
   70 | const char _NPE_PY_BINDING_a_type_s = npe::detail::transform_typechar(static_cast<pybind11::array&>(a).dtype().type());
      |                                                                                                                ^~~~
      |                                                                                                                dtype
....../numpyeigen/build/tests/default_matches.out.cpp:84:112: error: ‘class pybind11::dtype’ has no member named ‘type’; did you mean ‘dtype’?
   84 | const char _NPE_PY_BINDING_b_type_s = npe::detail::transform_typechar(static_cast<pybind11::array&>(b).dtype().type());
      |                                                                                                                ^~~~
      |                                                                                                                dtype
....../numpyeigen/build/tests/default_matches.out.cpp:98:112: error: ‘class pybind11::dtype’ has no member named ‘type’; did you mean ‘dtype’?
   98 | const char _NPE_PY_BINDING_c_type_s = npe::detail::transform_typechar(static_cast<pybind11::array&>(c).dtype().type());
      |                                                                                                                ^~~~
      |                                                                                                                dtype
....../numpyeigen/build/tests/bool_arg.out.cpp: In lambda function:
....../numpyeigen/build/tests/bool_arg.out.cpp:160:114: error: ‘class pybind11::dtype’ has no member named ‘type’; did you mean ‘dtype’?
  160 | const char _NPE_PY_BINDING_a_type_s = npe::detail::transform_typechar(static_cast<npe::sparse_array&>(a).dtype().type());
      |                                                                                                                  ^~~~
      |                                                                                                                  dtype
....../numpyeigen/build/tests/bool_arg.out.cpp:174:114: error: ‘class pybind11::dtype’ has no member named ‘type’; did you mean ‘dtype’?
  174 | const char _NPE_PY_BINDING_b_type_s = npe::detail::transform_typechar(static_cast<npe::sparse_array&>(b).dtype().type());
      |                                                                                                                  ^~~~
      |                                                                                                                  dtype
....../numpyeigen/build/tests/default_arg.out.cpp: In lambda function:
....../numpyeigen/build/tests/default_arg.out.cpp:349:112: error: ‘class pybind11::dtype’ has no member named ‘type’; did you mean ‘dtype’?
  349 | const char _NPE_PY_BINDING_a_type_s = npe::detail::transform_typechar(static_cast<pybind11::array&>(a).dtype().type());
      |                                                                                                                ^~~~
      |                                                                                                                dtype
....../numpyeigen/build/tests/default_arg.out.cpp:363:112: error: ‘class pybind11::dtype’ has no member named ‘type’; did you mean ‘dtype’?
  363 | const char _NPE_PY_BINDING_c_type_s = npe::detail::transform_typechar(static_cast<pybind11::array&>(c).dtype().type());
      |                                                                                                                ^~~~
      |                                                                                                                dtype
....../numpyeigen/build/tests/matrix_add.out.cpp: In lambda function:
....../numpyeigen/build/tests/matrix_add.out.cpp:232:112: error: ‘class pybind11::dtype’ has no member named ‘type’; did you mean ‘dtype’?
  232 | const char _NPE_PY_BINDING_a_type_s = npe::detail::transform_typechar(static_cast<pybind11::array&>(a).dtype().type());
      |                                                                                                                ^~~~
      |                                                                                                                dtype
....../numpyeigen/build/tests/matrix_add.out.cpp:246:112: error: ‘class pybind11::dtype’ has no member named ‘type’; did you mean ‘dtype’?
  246 | const char _NPE_PY_BINDING_b_type_s = npe::detail::transform_typechar(static_cast<pybind11::array&>(b).dtype().type());
      |                                                                                                                ^~~~
      |                                                                                                                dtype
....../numpyeigen/build/tests/mutate_sparse_matrix.out.cpp: In lambda function:
....../numpyeigen/build/tests/mutate_sparse_matrix.out.cpp:24:114: error: ‘class pybind11::dtype’ has no member named ‘type’; did you mean ‘dtype’?
   24 | const char _NPE_PY_BINDING_a_type_s = npe::detail::transform_typechar(static_cast<npe::sparse_array&>(a).dtype().type());
      |                                                                                                                  ^~~~
      |                                                                                                                  dtype
....../numpyeigen/build/tests/matrix_add.out.cpp: In lambda function:
....../numpyeigen/build/tests/matrix_add.out.cpp:403:112: error: ‘class pybind11::dtype’ has no member named ‘type’; did you mean ‘dtype’?
  403 | const char _NPE_PY_BINDING_a_type_s = npe::detail::transform_typechar(static_cast<pybind11::array&>(a).dtype().type());
      |                                                                                                                ^~~~
      |                                                                                                                dtype
....../numpyeigen/build/tests/matrix_add.out.cpp:417:112: error: ‘class pybind11::dtype’ has no member named ‘type’; did you mean ‘dtype’?
  417 | const char _NPE_PY_BINDING_b_type_s = npe::detail::transform_typechar(static_cast<pybind11::array&>(b).dtype().type());
      |                                                                                                                ^~~~
      |                                                                                                                dtype
....../numpyeigen/build/tests/long_and_int.out.cpp: In lambda function:
....../numpyeigen/build/tests/long_and_int.out.cpp:48:112: error: ‘class pybind11::dtype’ has no member named ‘type’; did you mean ‘dtype’?
   48 | const char _NPE_PY_BINDING_b_type_s = npe::detail::transform_typechar(static_cast<pybind11::array&>(b).dtype().type());
      |                                                                                                                ^~~~
      |                                                                                                                dtype
....../numpyeigen/build/tests/long_and_int.out.cpp:62:112: error: ‘class pybind11::dtype’ has no member named ‘type’; did you mean ‘dtype’?
   62 | const char _NPE_PY_BINDING_a_type_s = npe::detail::transform_typechar(static_cast<pybind11::array&>(a).dtype().type());
      |                                                                                                                ^~~~
      |                                                                                                                dtype
....../numpyeigen/build/tests/matrix_add.out.cpp: In lambda function:
....../numpyeigen/build/tests/matrix_add.out.cpp:574:112: error: ‘class pybind11::dtype’ has no member named ‘type’; did you mean ‘dtype’?
  574 | const char _NPE_PY_BINDING_a_type_s = npe::detail::transform_typechar(static_cast<pybind11::array&>(a).dtype().type());
      |                                                                                                                ^~~~
      |                                                                                                                dtype
....../numpyeigen/build/tests/matrix_add.out.cpp:588:112: error: ‘class pybind11::dtype’ has no member named ‘type’; did you mean ‘dtype’?
  588 | const char _NPE_PY_BINDING_b_type_s = npe::detail::transform_typechar(static_cast<pybind11::array&>(b).dtype().type());
      |                                                                                                                ^~~~
      |                                                                                                                dtype
....../numpyeigen/build/tests/dense_like.out.cpp: In lambda function:
....../numpyeigen/build/tests/dense_like.out.cpp:55:114: error: ‘class pybind11::dtype’ has no member named ‘type’; did you mean ‘dtype’?
   55 | const char _NPE_PY_BINDING_a_type_s = npe::detail::transform_typechar(static_cast<npe::sparse_array&>(a).dtype().type());
      |                                                                                                                  ^~~~
      |                                                                                                                  dtype
....../numpyeigen/build/tests/dense_like.out.cpp:69:112: error: ‘class pybind11::dtype’ has no member named ‘type’; did you mean ‘dtype’?
   69 | const char _NPE_PY_BINDING_b_type_s = npe::detail::transform_typechar(static_cast<pybind11::array&>(b).dtype().type());
      |                                                                                                                ^~~~
      |                                                                                                                dtype
....../numpyeigen/build/tests/default_matches.out.cpp: In lambda function:
....../numpyeigen/build/tests/default_matches.out.cpp:306:112: error: ‘class pybind11::dtype’ has no member named ‘type’; did you mean ‘dtype’?
  306 | const char _NPE_PY_BINDING_a_type_s = npe::detail::transform_typechar(static_cast<pybind11::array&>(a).dtype().type());
      |                                                                                                                ^~~~
      |                                                                                                                dtype
....../numpyeigen/build/tests/default_matches.out.cpp:320:112: error: ‘class pybind11::dtype’ has no member named ‘type’; did you mean ‘dtype’?
  320 | const char _NPE_PY_BINDING_b_type_s = npe::detail::transform_typechar(static_cast<pybind11::array&>(b).dtype().type());
      |                                                                                                                ^~~~
      |                                                                                                                dtype
....../numpyeigen/build/tests/sparse_like.out.cpp: In lambda function:
....../numpyeigen/build/tests/sparse_like.out.cpp:496:112: error: ‘class pybind11::dtype’ has no member named ‘type’; did you mean ‘dtype’?
  496 | const char _NPE_PY_BINDING_a_type_s = npe::detail::transform_typechar(static_cast<pybind11::array&>(a).dtype().type());
      |                                                                                                                ^~~~
      |                                                                                                                dtype
....../numpyeigen/build/tests/default_matches.out.cpp:334:112: error: ‘class pybind11::dtype’ has no member named ‘type’; did you mean ‘dtype’?
  334 | const char _NPE_PY_BINDING_c_type_s = npe::detail::transform_typechar(static_cast<pybind11::array&>(c).dtype().type());
      |                                                                                                                ^~~~
      |                                                                                                                dtype
....../numpyeigen/build/tests/sparse_like.out.cpp:510:114: error: ‘class pybind11::dtype’ has no member named ‘type’; did you mean ‘dtype’?
  510 | const char _NPE_PY_BINDING_b_type_s = npe::detail::transform_typechar(static_cast<npe::sparse_array&>(b).dtype().type());
      |                                                                                                                  ^~~~
      |                                                                                                                  dtype
....../numpyeigen/build/tests/docstring.out.cpp: In lambda function:
....../numpyeigen/build/tests/docstring.out.cpp:31:112: error: ‘class pybind11::dtype’ has no member named ‘type’; did you mean ‘dtype’?
   31 | const char _NPE_PY_BINDING_a_type_s = npe::detail::transform_typechar(static_cast<pybind11::array&>(a).dtype().type());
      |                                                                                                                ^~~~
      |                                                                                                                dtype
....../numpyeigen/build/tests/default_matches.out.cpp:348:112: error: ‘class pybind11::dtype’ has no member named ‘type’; did you mean ‘dtype’?
  348 | const char _NPE_PY_BINDING_d_type_s = npe::detail::transform_typechar(static_cast<pybind11::array&>(d).dtype().type());
      |                                                                                                                ^~~~
      |                                                                                                                dtype
....../numpyeigen/build/tests/sparse_like.out.cpp:527:114: error: ‘class pybind11::dtype’ has no member named ‘type’; did you mean ‘dtype’?
  527 | const char _NPE_PY_BINDING_c_type_s = npe::detail::transform_typechar(static_cast<npe::sparse_array&>(c).dtype().type());
      |                                                                                                                  ^~~~
      |                                                                                                                  dtype
....../numpyeigen/build/tests/default_matches.out.cpp:362:112: error: ‘class pybind11::dtype’ has no member named ‘type’; did you mean ‘dtype’?
  362 | const char _NPE_PY_BINDING_e_type_s = npe::detail::transform_typechar(static_cast<pybind11::array&>(e).dtype().type());
      |                                                                                                                ^~~~
      |                                                                                                                dtype
....../numpyeigen/build/tests/default_matches.out.cpp:376:112: error: ‘class pybind11::dtype’ has no member named ‘type’; did you mean ‘dtype’?
  376 | const char _NPE_PY_BINDING_f_type_s = npe::detail::transform_typechar(static_cast<pybind11::array&>(f).dtype().type());
      |                                                                                                                ^~~~
      |                                                                                                                dtype
....../numpyeigen/build/tests/binding_example.out.cpp: In lambda function:
....../numpyeigen/build/tests/binding_example.out.cpp:29:112: error: ‘class pybind11::dtype’ has no member named ‘type’; did you mean ‘dtype’?
   29 | const char _NPE_PY_BINDING_a_type_s = npe::detail::transform_typechar(static_cast<pybind11::array&>(a).dtype().type());
      |                                                                                                                ^~~~
      |                                                                                                                dtype
....../numpyeigen/build/tests/binding_example.out.cpp:43:112: error: ‘class pybind11::dtype’ has no member named ‘type’; did you mean ‘dtype’?
   43 | const char _NPE_PY_BINDING_b_type_s = npe::detail::transform_typechar(static_cast<pybind11::array&>(b).dtype().type());
      |                                                                                                                ^~~~
      |                                                                                                                dtype
....../numpyeigen/build/tests/binding_example.out.cpp:57:112: error: ‘class pybind11::dtype’ has no member named ‘type’; did you mean ‘dtype’?
   57 | const char _NPE_PY_BINDING_c_type_s = npe::detail::transform_typechar(static_cast<pybind11::array&>(c).dtype().type());
      |                                                                                                                ^~~~
      |                                                                                                                dtype
....../numpyeigen/build/tests/binding_example.out.cpp:71:112: error: ‘class pybind11::dtype’ has no member named ‘type’; did you mean ‘dtype’?
   71 | const char _NPE_PY_BINDING_d_type_s = npe::detail::transform_typechar(static_cast<pybind11::array&>(d).dtype().type());
      |                                                                                                                ^~~~
      |                                                                                                                dtype
....../numpyeigen/build/tests/binding_example.out.cpp:85:112: error: ‘class pybind11::dtype’ has no member named ‘type’; did you mean ‘dtype’?
   85 | const char _NPE_PY_BINDING_e_type_s = npe::detail::transform_typechar(static_cast<pybind11::array&>(e).dtype().type());
      |                                                                                                                ^~~~
      |                                                                                                                dtype
....../numpyeigen/build/tests/sparse_matrix_passthru.out.cpp: In lambda function:
....../numpyeigen/build/tests/sparse_matrix_passthru.out.cpp:25:114: error: ‘class pybind11::dtype’ has no member named ‘type’; did you mean ‘dtype’?
   25 | const char _NPE_PY_BINDING_a_type_s = npe::detail::transform_typechar(static_cast<npe::sparse_array&>(a).dtype().type());
      |                                                                                                                  ^~~~
      |                                                                                                                  dtype
....../numpyeigen/build/tests/sparse_matrix_passthru.out.cpp:39:114: error: ‘class pybind11::dtype’ has no member named ‘type’; did you mean ‘dtype’?
   39 | const char _NPE_PY_BINDING_b_type_s = npe::detail::transform_typechar(static_cast<npe::sparse_array&>(b).dtype().type());
      |                                                                                                                  ^~~~
      |                                                                                                                  dtype
....../numpyeigen/build/tests/dtype.out.cpp: In lambda function:
....../numpyeigen/build/tests/dtype.out.cpp:27:112: error: ‘class pybind11::dtype’ has no member named ‘type’; did you mean ‘dtype’?
   27 | const char _NPE_PY_BINDING_a_type_s = npe::detail::transform_typechar(static_cast<pybind11::array&>(a).dtype().type());
      |                                                                                                                ^~~~
      |                                                                                                                dtype
....../numpyeigen/build/tests/sparse_like.out.cpp: In lambda function:
....../numpyeigen/build/tests/sparse_like.out.cpp:2806:112: error: ‘class pybind11::dtype’ has no member named ‘type’; did you mean ‘dtype’?
 2806 | const char _NPE_PY_BINDING_a_type_s = npe::detail::transform_typechar(static_cast<pybind11::array&>(a).dtype().type());
      |                                                                                                                ^~~~
      |                                                                                                                dtype
....../numpyeigen/build/tests/sparse_like.out.cpp:2820:114: error: ‘class pybind11::dtype’ has no member named ‘type’; did you mean ‘dtype’?
 2820 | const char _NPE_PY_BINDING_b_type_s = npe::detail::transform_typechar(static_cast<npe::sparse_array&>(b).dtype().type());
      |                                                                                                                  ^~~~
      |                                                                                                                  dtype
....../numpyeigen/build/tests/sparse_like.out.cpp:2837:114: error: ‘class pybind11::dtype’ has no member named ‘type’; did you mean ‘dtype’?
 2837 | const char _NPE_PY_BINDING_c_type_s = npe::detail::transform_typechar(static_cast<npe::sparse_array&>(c).dtype().type());
      |                                                                                                                  ^~~~
      |                                                                                                                  dtype
....../numpyeigen/build/tests/function_1d.out.cpp: In lambda function:
....../numpyeigen/build/tests/function_1d.out.cpp:846:112: error: ‘class pybind11::dtype’ has no member named ‘type’; did you mean ‘dtype’?
  846 | const char _NPE_PY_BINDING_v_type_s = npe::detail::transform_typechar(static_cast<pybind11::array&>(v).dtype().type());
      |                                                                                                                ^~~~
      |                                                                                                                dtype
....../numpyeigen/build/tests/function_1d.out.cpp:860:112: error: ‘class pybind11::dtype’ has no member named ‘type’; did you mean ‘dtype’?
  860 | const char _NPE_PY_BINDING_f_type_s = npe::detail::transform_typechar(static_cast<pybind11::array&>(f).dtype().type());
      |                                                                                                                ^~~~
      |                                                                                                                dtype
....../numpyeigen/build/tests/function_1d.out.cpp:874:112: error: ‘class pybind11::dtype’ has no member named ‘type’; did you mean ‘dtype’?
  874 | const char _NPE_PY_BINDING_p_type_s = npe::detail::transform_typechar(static_cast<pybind11::array&>(p).dtype().type());
      |                                                                                                                ^~~~
      |                                                                                                                dtype
....../numpyeigen/build/tests/function_1d.out.cpp:888:112: error: ‘class pybind11::dtype’ has no member named ‘type’; did you mean ‘dtype’?
  888 | const char _NPE_PY_BINDING_q_type_s = npe::detail::transform_typechar(static_cast<pybind11::array&>(q).dtype().type());
      |                                                                                                                ^~~~
      |                                                                                                                dtype
....../numpyeigen/build/tests/function_1d.out.cpp:902:112: error: ‘class pybind11::dtype’ has no member named ‘type’; did you mean ‘dtype’?
  902 | const char _NPE_PY_BINDING_r_type_s = npe::detail::transform_typechar(static_cast<pybind11::array&>(r).dtype().type());
      |                                                                                                                ^~~~
      |                                                                                                                dtype
....../numpyeigen/build/tests/function_1d.out.cpp:916:112: error: ‘class pybind11::dtype’ has no member named ‘type’; did you mean ‘dtype’?
  916 | const char _NPE_PY_BINDING_s_type_s = npe::detail::transform_typechar(static_cast<pybind11::array&>(s).dtype().type());
      |                                                                                                                ^~~~
      |                                                                                                                dtype
....../numpyeigen/build/tests/long_and_int.out.cpp: In lambda function:
....../numpyeigen/build/tests/long_and_int.out.cpp:622:112: error: ‘class pybind11::dtype’ has no member named ‘type’; did you mean ‘dtype’?
  622 | const char _NPE_PY_BINDING_b_type_s = npe::detail::transform_typechar(static_cast<pybind11::array&>(b).dtype().type());
      |                                                                                                                ^~~~
      |                                                                                                                dtype
....../numpyeigen/build/tests/long_and_int.out.cpp:636:112: error: ‘class pybind11::dtype’ has no member named ‘type’; did you mean ‘dtype’?
  636 | const char _NPE_PY_BINDING_a_type_s = npe::detail::transform_typechar(static_cast<pybind11::array&>(a).dtype().type());
      |                                                                                                                ^~~~
      |                                                                                                                dtype
....../numpyeigen/build/tests/dense_like.out.cpp: In lambda function:
....../numpyeigen/build/tests/dense_like.out.cpp:496:114: error: ‘class pybind11::dtype’ has no member named ‘type’; did you mean ‘dtype’?
  496 | const char _NPE_PY_BINDING_a_type_s = npe::detail::transform_typechar(static_cast<npe::sparse_array&>(a).dtype().type());
      |                                                                                                                  ^~~~
      |                                                                                                                  dtype
....../numpyeigen/build/tests/dense_like.out.cpp:510:112: error: ‘class pybind11::dtype’ has no member named ‘type’; did you mean ‘dtype’?
  510 | const char _NPE_PY_BINDING_b_type_s = npe::detail::transform_typechar(static_cast<pybind11::array&>(b).dtype().type());
      |                                                                                                                ^~~~
      |                                                                                                                dtype
....../numpyeigen/build/tests/dense_like.out.cpp:527:112: error: ‘class pybind11::dtype’ has no member named ‘type’; did you mean ‘dtype’?
  527 | const char _NPE_PY_BINDING_c_type_s = npe::detail::transform_typechar(static_cast<pybind11::array&>(c).dtype().type());
      |                                                                                                                ^~~~
      |                                                                                                                dtype
....../numpyeigen/build/tests/sparse_like.out.cpp: In lambda function:
....../numpyeigen/build/tests/sparse_like.out.cpp:5116:114: error: ‘class pybind11::dtype’ has no member named ‘type’; did you mean ‘dtype’?
 5116 | const char _NPE_PY_BINDING_a_type_s = npe::detail::transform_typechar(static_cast<npe::sparse_array&>(a).dtype().type());
      |                                                                                                                  ^~~~
      |                                                                                                                  dtype
....../numpyeigen/build/tests/sparse_like.out.cpp:5130:114: error: ‘class pybind11::dtype’ has no member named ‘type’; did you mean ‘dtype’?
 5130 | const char _NPE_PY_BINDING_b_type_s = npe::detail::transform_typechar(static_cast<npe::sparse_array&>(b).dtype().type());
      |                                                                                                                  ^~~~
      |                                                                                                                  dtype
....../numpyeigen/build/tests/sparse_like.out.cpp:5147:114: error: ‘class pybind11::dtype’ has no member named ‘type’; did you mean ‘dtype’?
 5147 | const char _NPE_PY_BINDING_c_type_s = npe::detail::transform_typechar(static_cast<npe::sparse_array&>(c).dtype().type());
      |                                                                                                                  ^~~~
      |                                                                                                                  dtype
....../numpyeigen/build/tests/long_and_int.out.cpp: In lambda function:
....../numpyeigen/build/tests/long_and_int.out.cpp:1196:112: error: ‘class pybind11::dtype’ has no member named ‘type’; did you mean ‘dtype’?
 1196 | const char _NPE_PY_BINDING_b_type_s = npe::detail::transform_typechar(static_cast<pybind11::array&>(b).dtype().type());
      |                                                                                                                ^~~~
      |                                                                                                                dtype
....../numpyeigen/build/tests/long_and_int.out.cpp:1210:112: error: ‘class pybind11::dtype’ has no member named ‘type’; did you mean ‘dtype’?
 1210 | const char _NPE_PY_BINDING_a_type_s = npe::detail::transform_typechar(static_cast<pybind11::array&>(a).dtype().type());
      |                                                                                                                ^~~~
      |                                                                                                                dtype
....../numpyeigen/build/tests/default_matches.out.cpp: In lambda function:
....../numpyeigen/build/tests/default_matches.out.cpp:1826:114: error: ‘class pybind11::dtype’ has no member named ‘type’; did you mean ‘dtype’?
 1826 | const char _NPE_PY_BINDING_a_type_s = npe::detail::transform_typechar(static_cast<npe::sparse_array&>(a).dtype().type());
      |                                                                                                                  ^~~~
      |                                                                                                                  dtype
....../numpyeigen/build/tests/default_matches.out.cpp:1840:114: error: ‘class pybind11::dtype’ has no member named ‘type’; did you mean ‘dtype’?
 1840 | const char _NPE_PY_BINDING_b_type_s = npe::detail::transform_typechar(static_cast<npe::sparse_array&>(b).dtype().type());
      |                                                                                                                  ^~~~
      |                                                                                                                  dtype
....../numpyeigen/build/tests/default_matches.out.cpp:1854:114: error: ‘class pybind11::dtype’ has no member named ‘type’; did you mean ‘dtype’?
 1854 | const char _NPE_PY_BINDING_c_type_s = npe::detail::transform_typechar(static_cast<npe::sparse_array&>(c).dtype().type());
      |                                                                                                                  ^~~~
      |                                                                                                                  dtype
....../numpyeigen/build/tests/default_matches.out.cpp:1868:112: error: ‘class pybind11::dtype’ has no member named ‘type’; did you mean ‘dtype’?
 1868 | const char _NPE_PY_BINDING_d_type_s = npe::detail::transform_typechar(static_cast<pybind11::array&>(d).dtype().type());
      |                                                                                                                ^~~~
      |                                                                                                                dtype
....../numpyeigen/build/tests/default_matches.out.cpp:1882:112: error: ‘class pybind11::dtype’ has no member named ‘type’; did you mean ‘dtype’?
 1882 | const char _NPE_PY_BINDING_e_type_s = npe::detail::transform_typechar(static_cast<pybind11::array&>(e).dtype().type());
      |                                                                                                                ^~~~
      |                                                                                                                dtype
....../numpyeigen/build/tests/default_matches.out.cpp:1896:112: error: ‘class pybind11::dtype’ has no member named ‘type’; did you mean ‘dtype’?
 1896 | const char _NPE_PY_BINDING_f_type_s = npe::detail::transform_typechar(static_cast<pybind11::array&>(f).dtype().type());
      |                                                                                                                ^~~~
      |                                                                                                                dtype
....../numpyeigen/build/tests/dense_like.out.cpp: In lambda function:
....../numpyeigen/build/tests/dense_like.out.cpp:3686:114: error: ‘class pybind11::dtype’ has no member named ‘type’; did you mean ‘dtype’?
 3686 | const char _NPE_PY_BINDING_a_type_s = npe::detail::transform_typechar(static_cast<npe::sparse_array&>(a).dtype().type());
      |                                                                                                                  ^~~~
      |                                                                                                                  dtype
....../numpyeigen/build/tests/dense_like.out.cpp:3700:112: error: ‘class pybind11::dtype’ has no member named ‘type’; did you mean ‘dtype’?
 3700 | const char _NPE_PY_BINDING_b_type_s = npe::detail::transform_typechar(static_cast<pybind11::array&>(b).dtype().type());
      |                                                                                                                ^~~~
      |                                                                                                                dtype
....../numpyeigen/build/tests/dense_like.out.cpp:3717:112: error: ‘class pybind11::dtype’ has no member named ‘type’; did you mean ‘dtype’?
 3717 | const char _NPE_PY_BINDING_c_type_s = npe::detail::transform_typechar(static_cast<pybind11::array&>(c).dtype().type());
      |                                                                                                                ^~~~
      |                                                                                                                dtype
cd ....../numpyeigen/build/tests && /usr/bin/strip ....../numpyeigen/build/tests/numpyeigen_helpers.cpython-38-x86_64-linux-gnu.so
make[2]: Leaving directory '....../numpyeigen/build'
[ 97%] Built target numpyeigen_helpers
....../numpyeigen/build/tests/dense_like.out.cpp: In lambda function:
....../numpyeigen/build/tests/dense_like.out.cpp:6876:112: error: ‘class pybind11::dtype’ has no member named ‘type’; did you mean ‘dtype’?
 6876 | const char _NPE_PY_BINDING_a_type_s = npe::detail::transform_typechar(static_cast<pybind11::array&>(a).dtype().type());
      |                                                                                                                ^~~~
      |                                                                                                                dtype
....../numpyeigen/build/tests/dense_like.out.cpp:6890:112: error: ‘class pybind11::dtype’ has no member named ‘type’; did you mean ‘dtype’?
 6890 | const char _NPE_PY_BINDING_b_type_s = npe::detail::transform_typechar(static_cast<pybind11::array&>(b).dtype().type());
      |                                                                                                                ^~~~
      |                                                                                                                dtype
....../numpyeigen/build/tests/dense_like.out.cpp:6907:112: error: ‘class pybind11::dtype’ has no member named ‘type’; did you mean ‘dtype’?
 6907 | const char _NPE_PY_BINDING_c_type_s = npe::detail::transform_typechar(static_cast<pybind11::array&>(c).dtype().type());
      |                                                                                                                ^~~~
      |                                                                                                                dtype
make[2]: *** [tests/CMakeFiles/numpyeigen_test.dir/build.make:350: tests/CMakeFiles/numpyeigen_test.dir/string_expr_docstring.out.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [tests/CMakeFiles/numpyeigen_test.dir/build.make:238: tests/CMakeFiles/numpyeigen_test.dir/mutate_matrix.out.cpp.o] Error 1
make[2]: *** [tests/CMakeFiles/numpyeigen_test.dir/build.make:280: tests/CMakeFiles/numpyeigen_test.dir/mutate_sparse_matrix.out.cpp.o] Error 1
make[2]: *** [tests/CMakeFiles/numpyeigen_test.dir/build.make:252: tests/CMakeFiles/numpyeigen_test.dir/sparse_matrix_add.out.cpp.o] Error 1
make[2]: *** [tests/CMakeFiles/numpyeigen_test.dir/build.make:322: tests/CMakeFiles/numpyeigen_test.dir/default_arg.out.cpp.o] Error 1
make[2]: *** [tests/CMakeFiles/numpyeigen_test.dir/build.make:378: tests/CMakeFiles/numpyeigen_test.dir/dtype.out.cpp.o] Error 1
make[2]: *** [tests/CMakeFiles/numpyeigen_test.dir/build.make:420: tests/CMakeFiles/numpyeigen_test.dir/bool_arg.out.cpp.o] Error 1
make[2]: *** [tests/CMakeFiles/numpyeigen_test.dir/build.make:308: tests/CMakeFiles/numpyeigen_test.dir/docstring.out.cpp.o] Error 1
make[2]: *** [tests/CMakeFiles/numpyeigen_test.dir/build.make:434: tests/CMakeFiles/numpyeigen_test.dir/function_1d.out.cpp.o] Error 1
make[2]: *** [tests/CMakeFiles/numpyeigen_test.dir/build.make:294: tests/CMakeFiles/numpyeigen_test.dir/sparse_matrix_passthru.out.cpp.o] Error 1
make[2]: *** [tests/CMakeFiles/numpyeigen_test.dir/build.make:448: tests/CMakeFiles/numpyeigen_test.dir/long_and_int.out.cpp.o] Error 1
make[2]: *** [tests/CMakeFiles/numpyeigen_test.dir/build.make:406: tests/CMakeFiles/numpyeigen_test.dir/sparse_like.out.cpp.o] Error 1
make[2]: *** [tests/CMakeFiles/numpyeigen_test.dir/build.make:392: tests/CMakeFiles/numpyeigen_test.dir/default_matches.out.cpp.o] Error 1
make[2]: *** [tests/CMakeFiles/numpyeigen_test.dir/build.make:224: tests/CMakeFiles/numpyeigen_test.dir/matrix_add.out.cpp.o] Error 1
make[2]: *** [tests/CMakeFiles/numpyeigen_test.dir/build.make:266: tests/CMakeFiles/numpyeigen_test.dir/binding_example.out.cpp.o] Error 1
make[2]: *** [tests/CMakeFiles/numpyeigen_test.dir/build.make:462: tests/CMakeFiles/numpyeigen_test.dir/dense_like.out.cpp.o] Error 1
make[2]: Leaving directory '....../numpyeigen/build'
make[1]: *** [CMakeFiles/Makefile2:175: tests/CMakeFiles/numpyeigen_test.dir/all] Error 2
make[1]: Leaving directory '....../numpyeigen/build'
make: *** [Makefile:104: all] Error 2
@udaranga3001
Copy link

@jiapei100 I'm also having the same error. Did you find a solution?

@fwilliams
Copy link
Owner

Hi, thanks for posting this issue! To help me reproduce and fix it, do you have a cmake project that you could point me to? If not, could you paste a CMakeLists.txt and minimal binding?

@jiangzhongshi
Copy link

jiangzhongshi commented Oct 24, 2024

I did a bit of digging, this seems to be an issue of the newer version of pybind11.
Cross referencing https://github.com/pybind/pybind11/blob/master/include/pybind11/numpy.h#L1572
we need to change the codegen
from dtype().type() to dtype().char_()

out_file.write("const char %s = %s::transform_typechar(%s.dtype().char_());\n" %

jiangzhongshi added a commit to jiangzhongshi/numpyeigen that referenced this issue Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants