#!/usr/bin/env python # coding: utf-8 # In[1]: import numpy as np # In[2]: np.__version__ # ## truncation # In[3]: np.array(range(1500)) # In[4]: np.set_printoptions(threshold=5000) np.array(range(1500)) # ## Show more edge items # In[5]: # reset to default first np.set_printoptions(threshold=1000) # In[6]: np.array(range(1500)) # In[7]: np.set_printoptions(edgeitems=5) np.array(range(1500)) # ## setting options temporarily # In[11]: import numpy as np with np.printoptions(edgeitems=1): # numpy code here uses the given options print(np.array(range(1500))) # other code is under current options print(np.array(range(1500)))