Merge 9b88b81fd0 into 8eb8eaf5a1
This commit is contained in:
commit
6901deee26
2 changed files with 9 additions and 0 deletions
|
|
@ -433,6 +433,7 @@ void ndarray_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t ki
|
|||
ndarray_print_bracket(print, 0, self->shape[ULAB_MAX_DIMS-4], "]");
|
||||
#endif
|
||||
}
|
||||
#if ULAB_PRINT_DTYPE
|
||||
mp_print_str(print, ", dtype=");
|
||||
if(self->boolean) {
|
||||
mp_print_str(print, "bool)");
|
||||
|
|
@ -457,6 +458,9 @@ void ndarray_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t ki
|
|||
mp_print_str(print, "float64)");
|
||||
#endif
|
||||
}
|
||||
#else
|
||||
mp_print_str(print, ")");
|
||||
#endif
|
||||
}
|
||||
|
||||
void ndarray_assign_elements(ndarray_obj_t *ndarray, mp_obj_t iterable, uint8_t dtype, size_t *idx) {
|
||||
|
|
|
|||
|
|
@ -74,6 +74,11 @@
|
|||
#define NDARRAY_PRINT_THRESHOLD 10
|
||||
#define NDARRAY_PRINT_EDGEITEMS 3
|
||||
|
||||
// determines whether an array's dtype should be printed with the array
|
||||
#ifndef ULAB_PRINT_DTYPE
|
||||
#define ULAB_PRINT_DTYPE (1)
|
||||
#endif
|
||||
|
||||
// determines, whether the dtype is an object, or simply a character
|
||||
// the object implementation is numpythonic, but requires more space
|
||||
#ifndef ULAB_HAS_DTYPE_OBJECT
|
||||
|
|
|
|||
Loading…
Reference in a new issue