cirq_google.api.v2.ndarrays.to_bitarray

Populate a new or provided BitArray message with the given numpy array.

Supports bool or uint8 arrays. If given a uint8 array where values are not either 0 or 1 a ValueError will be raised.

array Array to add.
out Message to add to. If None, create new message.