Guest User

Untitled

a guest
Jul 18th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. timestamp, values, labels = ...
  2. # If there is no label, simply use all zeros.
  3. labels = np.zeros_like(values, dtype=np.int32)
  4.  
  5. # Complete the timestamp, and obtain the missing point indicators.
  6. timestamp, missing, (values, labels) =
  7. complete_timestamp(timestamp, (values, labels))
  8.  
  9. ValueError: The shape of ``arrays[0]`` does not agree with the shape of `timestamp` ((109577, 11) vs (109577,))
  10.  
  11. if len(timestamp.shape) != 1:
  12. raise ValueError('`timestamp` must be a 1-D array')
  13.  
  14. has_arrays = arrays is not None
  15. arrays = [np.asarray(array) for array in (arrays or ())]
  16. for i, array in enumerate(arrays):
  17. if array.shape != timestamp.shape:
  18. raise ValueError('The shape of ``arrays[{}]`` does not agree with '
  19. 'the shape of `timestamp` ({} vs {})'.
  20. format(i, array.shape, timestamp.shape))
Add Comment
Please, Sign In to add comment