I am not able to get uint64_t* for np.datetime64
Open
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 18k
- Forks
- 2.3k
- Avg merge
- 5d 17h
- Merged PRs (30d)
- 10
Description
the error: "cannot convert value dtype('<M8[ns]') to dtype(uint64t)"
code example:
auto arr_value = py::cast<py::array_t<std::uint64_t, py::array::c_style>>(df["datetime_column].attr("to_numpy")());
std::uint64_t* pointer = static_cast<std::uint64_t*>(arr_value);
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the py::cast<py::array_t<std::uint64_t, py::array::c_style>> expression and trace pybind11's NumPy array conversion for np.datetime64 values. Determine whether the conversion should support this dtype and verify that the resulting array can provide the requested uint64_t pointer.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, numpy, python
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100