python - Is there a configuration file for Numpy? -


i use numpy command line , have remember apply recurrent settings, example setting output formatting:

np.set_printoptions(threshold=np.nan, precision=3, suppress=true, linewidth=180) 

is there global numpy config file automatically executed new python shell or during import can execute this? if not, there elegant way achieve effect?

i not aware of such configuration file numpy (for matplotlib example have the matplotlibrc file).

but, workaround, can set environment variable pythonstartup pointing python script whatever want everytime python section starts.

in case use import numpy np, import matplotlib.pyplot plt on... saving small amount of "overhead" everytime want try on python.

example on windows:

set pythonstartup=c:\users\yourlogin\somewhere\startup.py 

example on linux:

export pythonstartup=/usr/local/bin/startup.py 

you should set once using "control panel\system", example, on windows.


Comments

Popular posts from this blog

java - Run a .jar on Heroku -

java - Jtable duplicate Rows -

validation - How to pass paramaters like unix into windows batch file -