Skip to content

Commit e164fc1

Browse files
committed
Fixed warning about ragged arrays
was using np.size to get length of the z list, but now that we allow None in the list that caused a warning that the array was ragged. Switched to using len()
1 parent fdc82ff commit e164fc1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

filterpy/kalman/UKF.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,8 @@ def batch_filter(self, zs, Rs=None, dts=None, UT=None, saver=None):
603603
raise TypeError(
604604
'each element in zs must be a 1D array of length {}'.format(self._dim_z))
605605

606-
z_n = np.size(zs, 0)
606+
z_n = len(zs)
607+
607608
if Rs is None:
608609
Rs = [self.R] * z_n
609610

0 commit comments

Comments
 (0)