File tree Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -580,7 +580,7 @@ mp_obj_t ndarray_iternext(mp_obj_t self_in) {
580
580
ndarray_obj_t * ndarray = MP_OBJ_TO_PTR (self -> ndarray );
581
581
// TODO: in numpy, ndarrays are iterated with respect to the first axis.
582
582
size_t iter_end = 0 ;
583
- if (( ndarray -> m == 1 ) ) {
583
+ if (ndarray -> m == 1 ) {
584
584
iter_end = ndarray -> array -> len ;
585
585
} else {
586
586
iter_end = ndarray -> m ;
@@ -888,12 +888,12 @@ mp_obj_t ndarray_unary_op(mp_unary_op_t op, mp_obj_t self_in) {
888
888
return ndarray_copy (self_in );
889
889
}
890
890
ndarray = MP_OBJ_TO_PTR (ndarray_copy (self_in ));
891
- if (( self -> array -> typecode == NDARRAY_INT8 ) ) {
891
+ if (self -> array -> typecode == NDARRAY_INT8 ) {
892
892
int8_t * array = (int8_t * )ndarray -> array -> items ;
893
893
for (size_t i = 0 ; i < self -> array -> len ; i ++ ) {
894
894
if (array [i ] < 0 ) array [i ] = - array [i ];
895
895
}
896
- } else if (( self -> array -> typecode == NDARRAY_INT16 ) ) {
896
+ } else if (self -> array -> typecode == NDARRAY_INT16 ) {
897
897
int16_t * array = (int16_t * )ndarray -> array -> items ;
898
898
for (size_t i = 0 ; i < self -> array -> len ; i ++ ) {
899
899
if (array [i ] < 0 ) array [i ] = - array [i ];
Original file line number Diff line number Diff line change @@ -89,8 +89,8 @@ mp_obj_t poly_polyfit(size_t n_args, const mp_obj_t *args) {
89
89
if (!object_is_nditerable (args [0 ])) {
90
90
mp_raise_ValueError ("input data must be an iterable" );
91
91
}
92
- uint16_t lenx , leny ;
93
- uint8_t deg ;
92
+ uint16_t lenx = 0 , leny = 0 ;
93
+ uint8_t deg = 0 ;
94
94
mp_float_t * x , * XT , * y , * prod ;
95
95
96
96
if (n_args == 2 ) { // only the y values are supplied
Original file line number Diff line number Diff line change 5116
5116
},
5117
5117
{
5118
5118
"cell_type" : " code" ,
5119
- "execution_count" : 504 ,
5119
+ "execution_count" : 507 ,
5120
5120
"metadata" : {
5121
5121
"ExecuteTime" : {
5122
- "end_time" : " 2019-11-14T19:23:36.725005Z " ,
5123
- "start_time" : " 2019-11-14T19:23:36.718109Z "
5122
+ "end_time" : " 2019-11-14T19:27:23.050475Z " ,
5123
+ "start_time" : " 2019-11-14T19:27:23.043203Z "
5124
5124
},
5125
5125
"code_folding" : []
5126
5126
},
You can’t perform that action at this time.
0 commit comments