Zulip Chat Archive
Stream: Is there code for X?
Topic: Vector of ones
Ashley Blacquiere (Oct 05 2022 at 01:50):
Is there any notion of a vector of ones, like docs#bitvec.one, but all ones?
Matt Diamond (Oct 05 2022 at 02:46):
Do you mean as a distinct type? You can do vector.repeat bool.tt n
if you just want to generate a bitvec of n
ones
Adam Topaz (Oct 05 2022 at 02:46):
import data.bitvec.basic
#eval (bitvec.zero 10).not
Or what Matt said ;)
Last updated: Dec 20 2023 at 11:08 UTC