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

Function is_none_slice

python/src/indexing.cpp:12–17  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10#include "python/src/indexing.h"
11
12bool is_none_slice(const nb::slice& in_slice) {
13 return (
14 nb::getattr(in_slice, "start").is_none() &&
15 nb::getattr(in_slice, "stop").is_none() &&
16 nb::getattr(in_slice, "step").is_none());
17}
18
19bool is_index_scalar(const nb::object& obj) {
20 if (nb::isinstance<nb::bool_>(obj)) {

Callers 2

mlx_get_item_sliceFunction · 0.85
mlx_scatter_args_sliceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected