you should use mdtraj.utils.arrays.ensure_type here