BUG: fix loading large npz files (bug #2922)