ext/slicing.c
bool is_slice(nmatrix* nmat, VALUE* indices){
  for(size_t i = 0; i < nmat->ndims; ++i){
    if(rb_obj_is_kind_of(indices[i], rb_cRange) == Qtrue)
      return true;
  }

  return false;
}
/*
 *  checks if the given set of indices corresponds
 *  to a single element or a slice.
 *
 */
checks if the given set of indices corresponds
to a single element or a slice.
checks if the given set of indices corresponds to a single element or a slice .
bool is_slice(nmatrix* nmat, VALUE* indices){
  for(size_t i = 0; i < nmat->ndims; ++i){
    if(rb_obj_is_kind_of(indices[i], rb_cRange) == Qtrue)
      return true;
  }
  return false;
}
bool is_slice ( nmatrix * nmat , VALUE * indices ) { for ( size_t i = 0 ; i < nmat -> ndims ; ++ i ) { if ( rb_obj_is_kind_of ( indices [ i ] , rb_cRange ) == Qtrue ) return true ; } return false ; }
checks if the given set of indices corresponds
  to a single element or a slice.
checks if the given set of indices corresponds to a single element or a slice .