I presume the `toarray()` call is equivalent to the `for` loop above?