@@ -54,8 +54,8 @@ void bind_mutable_module(py::module& m) {
5454 py::return_value_policy::reference)
5555 .def_property_readonly (
5656 " soma" ,
57- static_cast <std::shared_ptr<morphio::mut:: Soma>& (morphio::mut::Morphology::*) ()>(
58- &morphio::mut::Morphology::soma),
57+ static_cast <std::shared_ptr<morphio::Soma> (morphio::mut::Morphology::*) ()>(
58+ &morphio::mut::Morphology::soma),
5959 " Returns a reference to the soma object\n\n "
6060 " Note: multiple morphologies can share the same Soma "
6161 " instance" )
@@ -452,42 +452,6 @@ void bind_mutable_module(py::module& m) {
452452 " point_level_properties" _a,
453453 " section_type" _a = morphio::SectionType::SECTION_UNDEFINED);
454454
455- py::class_<morphio::mut::Soma, std::shared_ptr<morphio::mut::Soma>>(m, " Soma" )
456- .def (py::init<const morphio::Property::PointLevel&>())
457- .def_property (
458- " points" ,
459- [](morphio::mut::Soma* soma) {
460- return py::array (static_cast <py::ssize_t >(soma->points ().size ()),
461- soma->points ().data ());
462- },
463- [](morphio::mut::Soma* soma, py::array_t <morphio::floatType> _points) {
464- soma->points () = array_to_points (_points);
465- },
466- " Returns the coordinates (x,y,z) of all soma point" )
467- .def_property (
468- " diameters" ,
469- [](morphio::mut::Soma* soma) {
470- return py::array (static_cast <py::ssize_t >(soma->diameters ().size ()),
471- soma->diameters ().data ());
472- },
473- [](morphio::mut::Soma* soma, py::array_t <morphio::floatType> _diameters) {
474- soma->diameters () = _diameters.cast <std::vector<morphio::floatType>>();
475- },
476- " Returns the diameters of all soma points" )
477- .def_property_readonly (" type" , &morphio::mut::Soma::type, " Returns the soma type" )
478- .def_property_readonly (" surface" ,
479- &morphio::mut::Soma::surface,
480- " Returns the soma surface\n\n "
481- " Note: the soma surface computation depends on the soma type" )
482- .def_property_readonly (" max_distance" ,
483- &morphio::mut::Soma::maxDistance,
484- " Return the maximum distance between the center of gravity "
485- " and any of the soma points" )
486- .def_property_readonly (
487- " center" ,
488- [](morphio::mut::Soma* soma) { return py::array (3 , soma->center ().data ()); },
489- " Returns the center of gravity of the soma points" );
490-
491455 py::class_<morphio::mut::EndoplasmicReticulum>(m, " EndoplasmicReticulum" )
492456 .def (py::init<>())
493457 .def (py::init<const std::vector<uint32_t >&,
0 commit comments