In [1]:
%matplotlib inline
from massinference.plot import Limits
from massinference.map import KappaMap, ShearMap
import matplotlib.pyplot as plt
limits = Limits(1.8, 1.65, -2.0, -1.9)
plot_config = KappaMap.default().plot(limits=limits)
ShearMap.default().plot(plot_config=plot_config)
Out[1]:
In [22]:
import numpy as np
x = np.random.rand(10**8)
%timeit -n 1 -r 1 np.isnan(x)
%timeit -n 1 -r 1 np.isnan(np.sum(x))
In [29]:
%timeit -n 1 -r 1 np.sum(-x)
%timeit -n 1 -r 1 (-np.sum(x))