perhaps it's even better to have the capacity automatically inferred by scipy? the np.ones is integer type so you don't have to cast it to integer type later anyhow.