if it works, use 'asarray' to convert type, instead of 'array' (which creates a full new vector)