Jeanette Johnson
Jeanette Johnson
found this, gonna try it: https://github.com/pybind/pybind11/issues/2702 EDIT: no luck, but my binding is now: ``` .def("__getitem__", (float (Vec::*)(unsigned)) &Vec::operator[]); ```
Thank you for the reply! I tried that, and it resulted in this compilation error: ``` src/bindings.cpp:158:10: error: no matching member function for call to 'def' .def("__getitem__", &Vec::operator[]); ~^~~ ```...
Yes! Binding: ``` py::class_(m, "Vec") .def(py::init()) .def("size", &Vec::size) .def("__setitem__", [](Vec* vec, unsigned index, float val) { (*vec)[index] = val; }) .def("__getitem__", &Vec::operator[]); ``` C++: ``` float Vec::operator[](unsigned i) const {...
an example of when this would be an issue is when you're plotting cell data colored by annotation. if the annotation doesn't correspond to the cell it becomes meaningless.
So I think this may be because the function is looking for a slot called "family" that's now called "expressionFamily." haven't found a way around it yet...
> So I think this may be because the function is looking for a slot called "family" that's now called "expressionFamily." haven't found a way around it yet... Nope, that...
> Would anyone mind sharing code showing how to use the monocle 2 tool plot_pseudotime_heatmap with a cds generate with monocle 3? I'm completely stumped and would greatly appreciate it!...