MCPcopy Create free account
hub / github.com/ml-explore/mlx-data / shape_if

Method shape_if

mlx/data/Dataset.cpp:825–834  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

823
824template <class T, class B>
825T Dataset<T, B>::shape_if(
826 bool cond,
827 const std::string& ikey,
828 const std::string& okey) const {
829 if (cond) {
830 return transform_(std::make_shared<op::Shape>(ikey, okey));
831 } else {
832 return T(self_);
833 }
834}
835
836template <class T, class B>
837T Dataset<T, B>::shape(

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected