fix type inference
This commit is contained in:
parent
1398a8606f
commit
fdc065e9e4
3 changed files with 8 additions and 2 deletions
|
|
@ -1482,7 +1482,7 @@ ndarray_obj_t *ndarray_from_mp_obj(mp_obj_t obj, uint8_t other_type) {
|
|||
|
||||
if(mp_obj_is_int(obj)) {
|
||||
int32_t ivalue = mp_obj_get_int(obj);
|
||||
if((ivalue < -32767) || (ivalue > 32767)) {
|
||||
if((ivalue < -32767) || (ivalue > 65535)) {
|
||||
// the integer value clearly does not fit the ulab integer types, so move on to float
|
||||
ndarray = ndarray_new_linear_array(1, NDARRAY_FLOAT);
|
||||
mp_float_t *array = (mp_float_t *)ndarray->array;
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@
|
|||
#include "user/user.h"
|
||||
#include "utils/utils.h"
|
||||
|
||||
#define ULAB_VERSION 6.7.6
|
||||
#define ULAB_VERSION 6.7.7
|
||||
#define xstr(s) str(s)
|
||||
#define str(s) #s
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,9 @@
|
|||
Fri, 06 Jun 2025
|
||||
|
||||
version 6.7.7
|
||||
|
||||
fix ndarray type inference for micropython objects
|
||||
|
||||
Thu, 29 May 2025
|
||||
|
||||
version 6.7.6
|
||||
|
|
|
|||
Loading…
Reference in a new issue