Using `asarray` here seems fine to me. Though I would slightly prefer figuring out why a float was passed.