import numpy as np
data = np.random.randn()
print(data)
1.477316553807633
help(np.random.randn)
Help on built-in function randn:
randn(...) method of numpy.random.mtrand.RandomState instance
randn(d0, d1, ..., dn)
Return a sample (or samples) from the "standard normal" distribution.
.. note::
This is a convenience function for users porting code from Matlab,
and wraps `standard_normal`. That function takes a
tuple to specify the size of the output, which is consistent with
other NumPy functions like `numpy.zeros` and `numpy.ones`.
.. note::
New code should use the ``standard_normal`` method of a ``default_rng()``
instance instead; please see the :ref:`random-quick-start`.
If positive int_like arguments are provided, `randn` generates an array
of shape ``(d0, d1, ..., dn)``, filled
with random floats sampled from a univariate "normal" (Gaussian)
distribution of mean 0 and variance 1. A single float randomly sampled
from the distribution is returned if no argument is provided.
Parameters
----------
d0, d1, ..., dn : int, optional
The dimensions of the returned array, must be non-negative.
If no argument is given a single Python float is returned.
Returns
-------
Z : ndarray or float
A ``(d0, d1, ..., dn)``-shaped array of floating-point samples from
the standard normal distribution, or a single such float if
no parameters were supplied.
See Also
--------
standard_normal : Similar, but takes a tuple as its argument.
normal : Also accepts mu and sigma arguments.
Generator.standard_normal: which should be used for new code.
Notes
-----
For random samples from :math:`N(\mu, \sigma^2)`, use:
``sigma * np.random.randn(...) + mu``
Examples
--------
>>> np.random.randn()
2.1923875335537315 # random
Two-by-four array of samples from N(3, 6.25):
>>> 3 + 2.5 * np.random.randn(2, 4)
array([[-4.49401501, 4.00950034, -1.81814867, 7.29718677], # random
[ 0.39924804, 4.68456316, 4.99394529, 4.84057254]]) # random
data = np.random.randn(1)
print(data)
[-0.53983028]
data = np.random.randn(1, 1)
print(data)
[[1.6505055]]
data = np.random.randn(1, 2)
print(data)
[[0.3749871 0.71201646]]
data = np.random.randn(2, 1)
print(data)
[[ 0.73582661] [-0.26122281]]
data = np.random.randn(2, 2)
print(data)
[[ 1.04261732 -0.371615 ] [ 0.906895 1.06395375]]
data = np.random.randn(5, 3)
print(data)
[[-0.58313364 0.23533815 0.62590409] [-0.57606516 0.56858375 0.11599273] [-0.15944566 -0.04440599 -1.9344677 ] [ 0.2072362 0.09739415 -0.10913821] [ 0.6752176 1.02096908 0.52845098]]
data = np.random.randn(2, 2, 2)
print(data)
[[[ 0.18180266 -0.11186876] [-1.59203303 0.72865586]] [[-0.33880365 -2.14863262] [ 0.75642354 0.00444073]]]
data = np.random.randn(2, 2, 2, 2)
print(data)
[[[[ 0.73305899 -0.08000291] [ 1.67389066 -0.01070587]] [[-0.140984 -0.44136521] [-0.81838988 0.81529132]]] [[[ 0.80843557 -0.22845219] [ 0.02868335 0.24550427]] [[-0.62867751 1.59987243] [ 0.58916169 0.00946045]]]]
data = 1 + 4 * np.random.randn(2, 4)
print(data)
[[ 4.71611794 -4.98171608 -0.19881503 -2.00719559] [-0.37513347 -8.25223898 5.25679584 -2.10412045]]
help(np.random.random())
Help on float object:
class float(object)
| float(x=0, /)
|
| Convert a string or number to a floating point number, if possible.
|
| Methods defined here:
|
| __abs__(self, /)
| abs(self)
|
| __add__(self, value, /)
| Return self+value.
|
| __bool__(self, /)
| self != 0
|
| __ceil__(self, /)
| Return the ceiling as an Integral.
|
| __divmod__(self, value, /)
| Return divmod(self, value).
|
| __eq__(self, value, /)
| Return self==value.
|
| __float__(self, /)
| float(self)
|
| __floor__(self, /)
| Return the floor as an Integral.
|
| __floordiv__(self, value, /)
| Return self//value.
|
| __format__(self, format_spec, /)
| Formats the float according to format_spec.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getnewargs__(self, /)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __int__(self, /)
| int(self)
|
| __le__(self, value, /)
| Return self<=value.
|
| __lt__(self, value, /)
| Return self<value.
|
| __mod__(self, value, /)
| Return self%value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __neg__(self, /)
| -self
|
| __pos__(self, /)
| +self
|
| __pow__(self, value, mod=None, /)
| Return pow(self, value, mod).
|
| __radd__(self, value, /)
| Return value+self.
|
| __rdivmod__(self, value, /)
| Return divmod(value, self).
|
| __repr__(self, /)
| Return repr(self).
|
| __rfloordiv__(self, value, /)
| Return value//self.
|
| __rmod__(self, value, /)
| Return value%self.
|
| __rmul__(self, value, /)
| Return value*self.
|
| __round__(self, ndigits=None, /)
| Return the Integral closest to x, rounding half toward even.
|
| When an argument is passed, work like built-in round(x, ndigits).
|
| __rpow__(self, value, mod=None, /)
| Return pow(value, self, mod).
|
| __rsub__(self, value, /)
| Return value-self.
|
| __rtruediv__(self, value, /)
| Return value/self.
|
| __sub__(self, value, /)
| Return self-value.
|
| __truediv__(self, value, /)
| Return self/value.
|
| __trunc__(self, /)
| Return the Integral closest to x between 0 and x.
|
| as_integer_ratio(self, /)
| Return integer ratio.
|
| Return a pair of integers, whose ratio is exactly equal to the original float
| and with a positive denominator.
|
| Raise OverflowError on infinities and a ValueError on NaNs.
|
| >>> (10.0).as_integer_ratio()
| (10, 1)
| >>> (0.0).as_integer_ratio()
| (0, 1)
| >>> (-.25).as_integer_ratio()
| (-1, 4)
|
| conjugate(self, /)
| Return self, the complex conjugate of any float.
|
| hex(self, /)
| Return a hexadecimal representation of a floating-point number.
|
| >>> (-0.1).hex()
| '-0x1.999999999999ap-4'
| >>> 3.14159.hex()
| '0x1.921f9f01b866ep+1'
|
| is_integer(self, /)
| Return True if the float is an integer.
|
| ----------------------------------------------------------------------
| Class methods defined here:
|
| __getformat__(typestr, /) from builtins.type
| You probably don't want to use this function.
|
| typestr
| Must be 'double' or 'float'.
|
| It exists mainly to be used in Python's test suite.
|
| This function returns whichever of 'unknown', 'IEEE, big-endian' or 'IEEE,
| little-endian' best describes the format of floating point numbers used by the
| C type named by typestr.
|
| __set_format__(typestr, fmt, /) from builtins.type
| You probably don't want to use this function.
|
| typestr
| Must be 'double' or 'float'.
| fmt
| Must be one of 'unknown', 'IEEE, big-endian' or 'IEEE, little-endian',
| and in addition can only be one of the latter two if it appears to
| match the underlying C reality.
|
| It exists mainly to be used in Python's test suite.
|
| Override the automatic determination of C-level floating point type.
| This affects how floats are converted to and from binary strings.
|
| fromhex(string, /) from builtins.type
| Create a floating-point number from a hexadecimal string.
|
| >>> float.fromhex('0x1.ffffp10')
| 2047.984375
| >>> float.fromhex('-0x1p-1074')
| -5e-324
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs) from builtins.type
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| imag
| the imaginary part of a complex number
|
| real
| the real part of a complex number
import random as rand
data = rand.random()
print(data)
0.18967981448389704
data = rand.randint(0, 9)
print(data)
5
data = rand.randrange(2, 20, 2)
print(data)
18
data = rand.randrange(2, 20, 2)
print(data)
16
data = rand.randrange(2, 20, 3)
print(data)
17
data = rand.randrange(2, 20, 3)
print(data)
14
data = rand.randrange(2, 20, 2)
print(data)
8
data = rand.sample(range(0, 1000), 5) # Returns a list of random numbers
print(data)
[637, 261, 759, 367, 814]
rand.sample(range(0, 1000), 10)
[794, 965, 255, 664, 53, 922, 160, 115, 380, 480]
import secrets as sec
data = sec.randbelow(10)
print(data)
9
data = np.random.choice([-2, 2])
print(data)
2
data = rand.choice('computer')
print(data)
p
data = rand.choice([12,23,45,67,65,43])
print(data)
43
mylist = [12,23,45,67,65,43]
rand.shuffle(mylist)
print(mylist)
[65, 23, 67, 12, 43, 45]
The random number generator needs a number to start with (a seed value), to be able to generate a random number.
By default the random number generator uses the current system time.
Use the seed() method to customize the start number of the random number generator.
Note: If you use the same seed value twice you will get the same random number twice.
np.random.seed(0)
print(np.random.random())
0.5488135039273248
np.random.seed(0)
print(np.random.random())
print(np.random.random())
0.5488135039273248 0.7151893663724195
np.random.seed(5)
print(np.random.random())
0.22199317108973948
np.random.seed(5)
print(np.random.random())
print(np.random.random())
print(np.random.random())
0.22199317108973948 0.8707323061773764 0.20671915533942642
np.random.seed(4)
np.random.rand(2, 3)
array([[0.96702984, 0.54723225, 0.97268436],
[0.71481599, 0.69772882, 0.2160895 ]])
newArray = np.random.randint(40, 50, size=(4, 4))
print(newArray)
[[48 44 44 40] [47 42 41 48] [48 41 43 41] [43 46 47 44]]
[808, 353, 576, 957, 767, 848, 691, 595, 157, 897]
import secrets
secrets.randbelow(100) #Returns a secure random number
78
data = np.random.randn(2,2)
data
array([[-0.30399233, -0.80794481],
[-0.05630968, 0.00349243]])
data_1 = data * 10
print(data_1)
[[-3.03992327 -8.07944812] [-0.56309675 0.03492434]]
data_2 = 2 * data + 3 * data_1
print(data_2)
[[ -9.72775446 -25.85423397] [ -1.80190961 0.11175789]]
data.shape
(2, 2)
data.dtype
dtype('float64')
list_1=[3, 4, 5, 6]
arr_1 = np.array(list_1)
print(arr_1)
print(type(list_1))
print(type(arr_1))
[3 4 5 6] <class 'list'> <class 'numpy.ndarray'>
nested_list=[[1, 2, 3],[4, 5, 6]]
arr1 = np.array(nested_list)
arr1
array([[1, 2, 3],
[4, 5, 6]])
arr1.ndim
2
data_2d = np.random.randn(2, 2)
print(data_2d)
data_2d.ndim
[[-2.13094688 0.59295836] [-1.48800643 0.09255949]]
2
data_3d = np.random.randn(2, 2, 2)
print(data_3d)
data_3d.ndim
[[[ 0.31044497 -0.19287783] [-0.45940093 1.13028842]] [[ 0.1156775 -0.0207763 ] [-0.06241833 -0.0659798 ]]]
3
data_4d = np.random.randn(2, 2, 2, 2)
print(data_4d)
data_4d.ndim
[[[[ 0.79498491 1.23363623] [-2.48322452 -0.37545716]] [[ 1.05713161 -0.19590964] [ 0.07968375 1.69099795]]] [[[-0.78256618 0.64268234] [-1.21056517 0.98169904]] [[ 0.34401048 1.5837225 ] [-0.59881856 -0.22645152]]]]
4
arr1.shape
(2, 3)
data_1.shape
(2, 2)
data_2.shape
(2, 2)
data_3d.shape
(2, 2, 2)
data_4d.shape
(2, 2, 2, 2)
np.zeros(5)
array([0., 0., 0., 0., 0.])
np.zeros((10, 10))
array([[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],
[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],
[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],
[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],
[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],
[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],
[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],
[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],
[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],
[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]])
np.eye(2)
array([[1., 0.],
[0., 1.]])
np.eye(2, 2)
array([[1., 0.],
[0., 1.]])
np.eye(4, 5)
array([[1., 0., 0., 0., 0.],
[0., 1., 0., 0., 0.],
[0., 0., 1., 0., 0.],
[0., 0., 0., 1., 0.]])
np.eye(3, 3, 1)
array([[0., 1., 0.],
[0., 0., 1.],
[0., 0., 0.]])
np.eye(3, 3, -1)
array([[0., 0., 0.],
[1., 0., 0.],
[0., 1., 0.]])
np.eye(4, 4, 2)
array([[0., 0., 1., 0.],
[0., 0., 0., 1.],
[0., 0., 0., 0.],
[0., 0., 0., 0.]])
np.eye(4, 4, -2)
array([[0., 0., 0., 0.],
[0., 0., 0., 0.],
[1., 0., 0., 0.],
[0., 1., 0., 0.]])
np.eye(4, 4, -2, dtype=int)
array([[0, 0, 0, 0],
[0, 0, 0, 0],
[1, 0, 0, 0],
[0, 1, 0, 0]])
np.eye(4, 4, -2, dtype=float)
array([[0., 0., 0., 0.],
[0., 0., 0., 0.],
[1., 0., 0., 0.],
[0., 1., 0., 0.]])
np.eye(4, 4, dtype=str)
array([['1', '', '', ''],
['', '1', '', ''],
['', '', '1', ''],
['', '', '', '1']], dtype='<U1')
arr = np.array([[2, 4, 6],[1, 3, 5]], dtype=float)
print(arr)
[[2. 4. 6.] [1. 3. 5.]]
arr_1 = arr + arr
print(arr_1)
[[ 4. 8. 12.] [ 2. 6. 10.]]
arr_2 = arr * arr
print(arr_2)
[[ 4. 16. 36.] [ 1. 9. 25.]]
arr_3 = arr / arr
print(arr_3)
[[1. 1. 1.] [1. 1. 1.]]
arr_4 = 2 * arr + arr / 2
print(arr_4)
[[ 5. 10. 15. ] [ 2.5 7.5 12.5]]
arr_5 = 2 / arr
print(arr_5)
[[1. 0.5 0.33333333] [2. 0.66666667 0.4 ]]
arr_6 = (arr > 2 * arr - 4)
print(arr_6)
[[ True False False] [ True True False]]
arr = np.arange(15)
print(arr)
print(arr[2:6])
[ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14] [2 3 4 5]
arr = np.arange(15)
print(arr)
arr[5:8] = 22
print(arr)
[ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14] [ 0 1 2 3 4 22 22 22 8 9 10 11 12 13 14]
arr = np.arange(15)
print(arr)
arr_7 = arr[2:6]
print(arr_7)
arr_7[1] = 55555
print(arr_7)
print(arr)
[ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14]
[2 3 4 5]
[ 2 55555 4 5]
[ 0 1 2 55555 4 5 6 7 8 9 10 11
12 13 14]
arr_8 = np.array([[1, 2, 3],[4, 5, 6],[7, 8, 9]])
print(arr_8[1])
[4 5 6]
arr_8[1][0]
4
arr_8[1, 0]
4
arr_8[2, 2]
9
arr_8[2][2]
9
data = np.random.randn(4, 4, 4, 4)
print(data)
[[[[-0.12688278 -0.26938181 0.75154279 -0.64844256] [ 1.65115105 0.13463855 -0.63797798 -0.34483293] [ 1.25597463 0.74097479 -0.50709275 0.11050999] [ 0.43641148 0.52726394 -2.32944326 0.62693526]] [[-1.666636 0.55425149 -1.25652299 -0.18676067] [ 0.99957887 -0.66427056 -0.07247487 1.80342536] [ 1.56421243 -0.81104201 -0.06218707 0.80757695] [-1.58343608 -0.61029736 0.40791697 -0.05019509]] [[ 0.69800238 -0.35944407 -0.15346871 -0.06176915] [ 0.89519522 0.42737734 -0.4790557 0.56156052] [-2.04167639 -0.03407687 0.15025116 -0.3674315 ] [ 0.92896358 0.13617429 -0.46941232 0.69539066]] [[ 1.12960257 0.36267395 0.38928482 -0.47817704] [ 2.76898965 0.63288262 -0.81103338 0.23429653] [ 0.85626985 1.8552226 0.41215397 -1.50016404] [-0.68008879 -0.72125222 0.9797636 0.44778604]]] [[[ 1.09857253 0.54401183 0.73431515 -0.43446415] [ 0.61649882 -0.41489344 -0.61073328 -0.54730513] [-0.61133691 -0.02137606 -0.23188054 0.87336277] [ 0.70303723 -0.55119018 0.3614788 0.8085328 ]] [[-0.23308931 -0.33946427 -0.43378086 0.30915678] [ 1.30430791 -0.92907961 1.17261215 0.66830077] [-0.15453542 0.26141117 0.13537924 -0.66152595] [ 1.36208708 0.88859812 0.12001426 -0.18228428]] [[-1.36437475 -0.63042381 0.45134611 1.26740162] [-0.06895308 0.39759067 -0.26537242 0.54426226] [ 1.51447685 -1.44019693 1.78265027 -0.49805926] [-0.58421384 -0.64503914 0.80583043 1.70567612]] [[-0.85956373 -1.44574918 -2.4623635 0.22265509] [ 2.32104302 -0.73914138 -1.1489653 -1.18444502] [ 0.8234666 -0.4755211 -0.02820394 0.48055398] [ 0.03288843 -0.57221884 -0.2590394 -1.61607084]]] [[[ 1.03801032 0.73503741 0.74163536 0.66543934] [-1.64364465 0.5526853 -1.47705186 -0.51053322] [-0.27973491 1.49856227 0.77917496 0.54771635] [ 1.77592406 -0.04483814 1.98142957 -0.09159693]] [[ 0.75575879 1.00481138 0.43939317 1.04857494] [ 1.07763879 -0.35168449 -0.9534964 -1.25662345] [-0.80321306 2.19634778 0.38482819 -0.32578868] [-1.01571334 0.23440431 -1.55164339 1.34625634]] [[ 0.15944167 2.67838934 -1.40871906 -1.21624729] [ 0.72125855 -0.31163328 -0.21474788 -0.53534588] [ 2.60115524 -0.62266846 -0.32683003 0.15543094] [ 0.80837262 0.91380865 0.09347275 2.83814249]] [[ 0.9535305 0.93819762 -0.04642802 0.41287864] [-0.11912626 -0.89668121 0.90949599 0.83247143] [-0.32627896 -0.32957755 0.27822481 0.06405802] [ 0.13947706 -0.09390629 1.4836579 -0.09423524]]] [[[ 1.32533602 0.4316732 -0.71550763 0.68636537] [ 0.59660949 -0.2631686 0.66583221 -0.61896597] [-0.62094841 -0.33476751 -0.63885347 -0.01496852] [-0.3000989 0.04780684 0.84162116 -0.59698935]] [[ 1.78736951 -0.2276659 1.403889 -0.84056617] [-1.08219147 0.12263172 0.55672651 1.10553533] [-1.11114285 -0.23924098 0.14296923 1.5983224 ] [-1.03657182 -0.3817046 0.3046971 0.7211828 ]] [[ 2.11602331 0.52124732 2.29723819 0.6860082 ] [ 0.36213378 -0.89038897 -0.36879504 -0.45320696] [ 1.8507086 -0.38628484 0.23548333 1.8517536 ] [ 2.4121577 -0.88246219 -0.385555 0.51740361]] [[ 1.45255097 1.10893088 -0.34432328 -0.15974415] [-1.28529297 0.1827696 -0.49447639 -0.37588865] [ 0.55040313 0.45922136 -0.16697084 0.03975264] [ 1.14481136 -0.70388372 -0.44056467 -0.43658841]]]]
print(data[3, 3, 3, 3])
-0.43658841109124347
print(data[3, 3, 3, 2])
-0.4405646727584477
print(data[3, 2, 3, 3])
0.5174036142350413
print(data[3, 3])
[[ 1.45255097 1.10893088 -0.34432328 -0.15974415] [-1.28529297 0.1827696 -0.49447639 -0.37588865] [ 0.55040313 0.45922136 -0.16697084 0.03975264] [ 1.14481136 -0.70388372 -0.44056467 -0.43658841]]
print(data[3, 3, 3])
[ 1.14481136 -0.70388372 -0.44056467 -0.43658841]
data[0]
array([[[-0.12688278, -0.26938181, 0.75154279, -0.64844256],
[ 1.65115105, 0.13463855, -0.63797798, -0.34483293],
[ 1.25597463, 0.74097479, -0.50709275, 0.11050999],
[ 0.43641148, 0.52726394, -2.32944326, 0.62693526]],
[[-1.666636 , 0.55425149, -1.25652299, -0.18676067],
[ 0.99957887, -0.66427056, -0.07247487, 1.80342536],
[ 1.56421243, -0.81104201, -0.06218707, 0.80757695],
[-1.58343608, -0.61029736, 0.40791697, -0.05019509]],
[[ 0.69800238, -0.35944407, -0.15346871, -0.06176915],
[ 0.89519522, 0.42737734, -0.4790557 , 0.56156052],
[-2.04167639, -0.03407687, 0.15025116, -0.3674315 ],
[ 0.92896358, 0.13617429, -0.46941232, 0.69539066]],
[[ 1.12960257, 0.36267395, 0.38928482, -0.47817704],
[ 2.76898965, 0.63288262, -0.81103338, 0.23429653],
[ 0.85626985, 1.8552226 , 0.41215397, -1.50016404],
[-0.68008879, -0.72125222, 0.9797636 , 0.44778604]]])
data[0][0][0]
array([-0.12688278, -0.26938181, 0.75154279, -0.64844256])
data[0][:2, 1:]
array([[[ 1.65115105, 0.13463855, -0.63797798, -0.34483293],
[ 1.25597463, 0.74097479, -0.50709275, 0.11050999],
[ 0.43641148, 0.52726394, -2.32944326, 0.62693526]],
[[ 0.99957887, -0.66427056, -0.07247487, 1.80342536],
[ 1.56421243, -0.81104201, -0.06218707, 0.80757695],
[-1.58343608, -0.61029736, 0.40791697, -0.05019509]]])
data[0][2, 1]
array([ 0.89519522, 0.42737734, -0.4790557 , 0.56156052])
names = np.array(['Ali','Amir','Mohsen','Saeid','Javad','Ali','Mehsen', "Arash", "Arash"])
data = np.random.randn(9,3)
print(data)
[[-0.40718616 -0.89357315 0.78531717] [ 1.03011402 0.59307481 0.61541361] [-0.2183198 -0.61962308 1.16622506] [ 0.33753964 0.73185729 -1.22905298] [ 1.09866586 -1.14214771 -0.83861241] [ 0.5122498 -0.31550333 -2.36065984] [ 0.4566558 -2.51800267 -0.97848972] [-0.13822712 0.54046843 1.37895088] [ 0.4217787 1.11299999 1.03144128]]
data[names == 'Ali']
array([[-0.40718616, -0.89357315, 0.78531717],
[ 0.5122498 , -0.31550333, -2.36065984]])
data[names == 'Arash']
array([[-0.13822712, 0.54046843, 1.37895088],
[ 0.4217787 , 1.11299999, 1.03144128]])
data[names == 'Javad']
array([[ 1.09866586, -1.14214771, -0.83861241]])
data[names=='Ali', 1:3]
array([[-0.89357315, 0.78531717],
[-0.31550333, -2.36065984]])
~(names=='Ali')
array([False, True, True, True, True, False, True, True, True])
(names=='Ali')
array([ True, False, False, False, False, True, False, False, False])
(names != 'Ali')
array([False, True, True, True, True, False, True, True, True])
mask = (names == 'Ali') | (names == 'Amir')
data[mask]
array([[-0.40718616, -0.89357315, 0.78531717],
[ 1.03011402, 0.59307481, 0.61541361],
[ 0.5122498 , -0.31550333, -2.36065984]])
mask = (names == 'Ali') & (names == 'Amir')
data[mask]
array([], shape=(0, 3), dtype=float64)
mask = (names == 'Ali')
data[mask]
array([[-0.40718616, -0.89357315, 0.78531717],
[ 0.5122498 , -0.31550333, -2.36065984]])
print(data)
[[-0.40718616 -0.89357315 0.78531717] [ 1.03011402 0.59307481 0.61541361] [-0.2183198 -0.61962308 1.16622506] [ 0.33753964 0.73185729 -1.22905298] [ 1.09866586 -1.14214771 -0.83861241] [ 0.5122498 -0.31550333 -2.36065984] [ 0.4566558 -2.51800267 -0.97848972] [-0.13822712 0.54046843 1.37895088] [ 0.4217787 1.11299999 1.03144128]]
data[data<0] = 0
print(data)
[[0. 0. 0.78531717] [1.03011402 0.59307481 0.61541361] [0. 0. 1.16622506] [0.33753964 0.73185729 0. ] [1.09866586 0. 0. ] [0.5122498 0. 0. ] [0.4566558 0. 0. ] [0. 0.54046843 1.37895088] [0.4217787 1.11299999 1.03144128]]
data_1 = np.arange(25)
print(data_1)
data_2 = np.arange(25).reshape((5,5))
print(data_2)
[ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24] [[ 0 1 2 3 4] [ 5 6 7 8 9] [10 11 12 13 14] [15 16 17 18 19] [20 21 22 23 24]]
data_2.T
array([[ 0, 5, 10, 15, 20],
[ 1, 6, 11, 16, 21],
[ 2, 7, 12, 17, 22],
[ 3, 8, 13, 18, 23],
[ 4, 9, 14, 19, 24]])
import numpy as np
import matplotlib.pyplot as plt
data_1 = np.array([0,1,4,10])
print(data_1)
[ 0 1 4 10]
data_2 = np.zeros((5, 5))
print(data_2)
[[0. 0. 0. 0. 0.] [0. 0. 0. 0. 0.] [0. 0. 0. 0. 0.] [0. 0. 0. 0. 0.] [0. 0. 0. 0. 0.]]
data_3 = np.ones((5, 5))
print(data_3)
[[1. 1. 1. 1. 1.] [1. 1. 1. 1. 1.] [1. 1. 1. 1. 1.] [1. 1. 1. 1. 1.] [1. 1. 1. 1. 1.]]
data_4 = np.eye(5, 5)
print(data_4)
[[1. 0. 0. 0. 0.] [0. 1. 0. 0. 0.] [0. 0. 1. 0. 0.] [0. 0. 0. 1. 0.] [0. 0. 0. 0. 1.]]
data_5 = np.random.random(5)
print(data_5)
[0.48158952 0.21745973 0.99304434 0.65963024 0.27717091]
data_6 = np.random.randn(5)
print(data_6)
[-0.94508596 1.73585508 -0.1503428 0.05645087 0.24795622]
data_7 = np.linspace(0, 5, 50)
print(data_7)
[0. 0.10204082 0.20408163 0.30612245 0.40816327 0.51020408 0.6122449 0.71428571 0.81632653 0.91836735 1.02040816 1.12244898 1.2244898 1.32653061 1.42857143 1.53061224 1.63265306 1.73469388 1.83673469 1.93877551 2.04081633 2.14285714 2.24489796 2.34693878 2.44897959 2.55102041 2.65306122 2.75510204 2.85714286 2.95918367 3.06122449 3.16326531 3.26530612 3.36734694 3.46938776 3.57142857 3.67346939 3.7755102 3.87755102 3.97959184 4.08163265 4.18367347 4.28571429 4.3877551 4.48979592 4.59183673 4.69387755 4.79591837 4.89795918 5. ]
data_8 = np.arange(0, 10, 0.2)
print(data_8)
[0. 0.2 0.4 0.6 0.8 1. 1.2 1.4 1.6 1.8 2. 2.2 2.4 2.6 2.8 3. 3.2 3.4 3.6 3.8 4. 4.2 4.4 4.6 4.8 5. 5.2 5.4 5.6 5.8 6. 6.2 6.4 6.6 6.8 7. 7.2 7.4 7.6 7.8 8. 8.2 8.4 8.6 8.8 9. 9.2 9.4 9.6 9.8]
plt.plot(data_4, data_4 ** 2)
plt.show()
plt.plot(data_8, data_8 ** 2)
plt.show()
plt.hist(data_4)
plt.show()
plt.hist(data_5)
plt.show()
def f(x):
return x ** np.exp(-x) / np.cos(x)
plt.plot(data_8, f(data_8))
[<matplotlib.lines.Line2D at 0x7faf3732aa60>]
a1 = np.array([2,4,6,8,10])
a1[2]
6
a1[2:]
array([ 6, 8, 10])
a1[:-2]
array([2, 4, 6])
a1[::2]
array([ 2, 6, 10])
a1>3
array([False, True, True, True, True])
a1[a1>3]
array([ 4, 6, 8, 10])
names = np.array(['Jim', 'Luke', 'Josh', 'Pete'])
first_letter_j = np.vectorize(lambda s: s[0])(names)=='J'
names[first_letter_j]
array(['Jim', 'Josh'], dtype='<U4')
a1%4
array([2, 0, 2, 0, 2])
a1%4==0
array([False, True, False, True, False])
a1[a1%4==0]
array([4, 8])
x = np.linspace(0, 10, 100)
y = np.cos(x)
dydx = np.gradient(y,x)
plt.plot(x, y, label = "y(x)")
plt.plot(x, dydx, label = "y'(x)")
plt.xlabel("x", fontsize = 20)
plt.legend()
<matplotlib.legend.Legend at 0x7faf18c440d0>
x = np.linspace(0, 4, 100)
y = x ** 2
dydx = np.gradient(y,x)
plt.plot(x, y, label = "y(x)")
plt.plot(x, dydx, label = "y'(x)")
plt.xlabel("x", fontsize = 20)
plt.legend()
<matplotlib.legend.Legend at 0x7faf18da5d30>
x = np.linspace(0, 10, 100)
y = np.cos(x)
y_integral = np.cumsum(y) * (x[1]-x[0])
plt.plot(x, y, label = "y(x)")
plt.plot(x, y_integral, label = "Integral y(x)")
plt.xlabel("x", fontsize = 20)
plt.legend()
<matplotlib.legend.Legend at 0x7faf185680a0>
x = np.linspace(0, 10, 100)
y = x
y_integral = np.cumsum(y) * (x[1]-x[0])
plt.plot(x, y, label = "y(x)")
plt.plot(x, y_integral, label = "Integral y(x)")
plt.xlabel("x", fontsize = 20)
plt.legend()
<matplotlib.legend.Legend at 0x7faf187b4910>
a1 = np.array([[4,6,4],[2,1,2],[5,6,7]])
a1*2
array([[ 8, 12, 8],
[ 4, 2, 4],
[10, 12, 14]])
2/a1
array([[0.5 , 0.33333333, 0.5 ],
[1. , 2. , 1. ],
[0.4 , 0.33333333, 0.28571429]])
a1.ravel()
array([4, 6, 4, 2, 1, 2, 5, 6, 7])
import numpy as np
x = np.array([[1, 3, 5], [11, 35, 56]])
print(x)
y=np.ravel(x)
print(y)
[[ 1 3 5] [11 35 56]] [ 1 3 5 11 35 56]
a1 = np.array([[4,6,4],[2,1,2],[5,6,7]])
a1
array([[4, 6, 4],
[2, 1, 2],
[5, 6, 7]])
a1>5
array([[False, True, False],
[False, False, False],
[False, True, True]])
a2 = np.random.randn(3,3)
a2
array([[ 0.27246429, -0.5173629 , -0.8995185 ],
[ 2.4572076 , 0.00496794, -0.08545545],
[-0.24749198, 1.07080257, 0.847907 ]])
a2[a1>5]
array([-0.5173629 , 1.07080257, 0.847907 ])
a1
array([[4, 6, 4],
[2, 1, 2],
[5, 6, 7]])
a1[0]
array([4, 6, 4])
a1[:,1]
array([6, 1, 6])
a1[1:][:,1]
array([1, 6])
a1
array([[4, 6, 4],
[2, 1, 2],
[5, 6, 7]])
b1 = np.resize(a1, (6,6))
b1
array([[4, 6, 4, 2, 1, 2],
[5, 6, 7, 4, 6, 4],
[2, 1, 2, 5, 6, 7],
[4, 6, 4, 2, 1, 2],
[5, 6, 7, 4, 6, 4],
[2, 1, 2, 5, 6, 7]])
b1[0:5:2][:,3:]
array([[2, 1, 2],
[5, 6, 7],
[4, 6, 4]])
x = np.linspace(0, 10, 1000)
y = np.linspace(0, 5, 500)
z = x**2 + y**2
--------------------------------------------------------------------------- ValueError Traceback (most recent call last) /var/folders/dw/p9lncvq57tv4px69pk911vl40000gn/T/ipykernel_11996/1736884560.py in <module> ----> 1 z = x**2 + y**2 ValueError: operands could not be broadcast together with shapes (1000,) (500,)
xv, yv = np.meshgrid(x, y)
zv = xv**2 + yv**2
plt.contourf(xv, yv, zv,levels=5)
plt.colorbar()
plt.show()
A = np.array([[3, 2, 1],[5,-5,4],[6,0,1]])
b1 = np.array([1,2,3])
b2 = np.array([-1,2,-5])
A
array([[ 3, 2, 1],
[ 5, -5, 4],
[ 6, 0, 1]])
b1
array([1, 2, 3])
b2
array([-1, 2, -5])
A@b1
array([10, 7, 9])
A@b2
array([ -4, -35, -11])
A.T
array([[ 3, 5, 6],
[ 2, -5, 0],
[ 1, 4, 1]])
np.dot(b1, b2)
-12
b1@b2
-12
np.cross(b1, b2)
array([-16, 2, 4])
A = np.array([[1, 2, 3],[5,6,7],[9,10,1]])
c = np.array([4,8,12])
np.linalg.solve(A,c)
array([-2.00000000e+00, 3.00000000e+00, -2.22044605e-16])
$ x + 2y = 3$
$ 4x + 5y = 6$
A = np.array([[1, 2],[4,5]])
c = np.array([3,6])
np.linalg.solve(A,c)
array([-1., 2.])
import numpy as np
A = np.array([[4, 0],[0, 4]])
A
array([[4, 0],
[0, 4]])
np.linalg.eig(A)
print('E-value:', w)
print('E-vector', v)
E-value: [-1. 4.] E-vector [[-0.89442719 -0.4472136 ] [ 0.4472136 -0.89442719]]
a = np.array([[0, 2],
[2, 3]])
w,v=np.linalg.eig(a)
print('E-value:', w)
print('E-vector', v)
E-value: [-1. 4.] E-vector [[-0.89442719 -0.4472136 ] [ 0.4472136 -0.89442719]]
from numpy.linalg import eig
a = np.array([[0, 2],
[2, 3]])
w,v=eig(a)
print('E-value:', w)
print('E-vector', v)
E-value: [-1. 4.] E-vector [[-0.89442719 -0.4472136 ] [ 0.4472136 -0.89442719]]
\right\rceil, \sigma_y = \left\lceil \begin{matrix} 0 & -i\\ i & 0 \end{matrix} \right\rceil, \sigma_z = \left\lceil \begin{matrix} 1 & 0\\ 0 & 1 \end{matrix} \right\rceil$
sigma_x = np.array([[0, 1],
[1, 0]])
w,v=eig(sigma_x)
print('E-value:', w)
print('E-vector', v)
E-value: [ 1. -1.] E-vector [[ 0.70710678 -0.70710678] [ 0.70710678 0.70710678]]
1/np.sqrt(2)
0.7071067811865475
sigma_y = np.array([[0, complex(0, -1)],
[complex(0, 1), 0]])
print(sigma_y)
w,v=eig(sigma_x)
print('E-value:', w)
print('E-vector', v)
[[0.+0.j 0.-1.j] [0.+1.j 0.+0.j]] E-value: [ 1. -1.] E-vector [[ 0.70710678 -0.70710678] [ 0.70710678 0.70710678]]
sigma_z = np.array([[1, 0],
[0, 1]])
w,v=eig(sigma_z)
print('E-value:', w)
print('E-vector', v)
E-value: [1. 1.] E-vector [[1. 0.] [0. 1.]]
x = np.linspace(0, 1, 10)
x
array([0. , 0.11111111, 0.22222222, 0.33333333, 0.44444444,
0.55555556, 0.66666667, 0.77777778, 0.88888889, 1. ])
f = x
f
array([0. , 0.11111111, 0.22222222, 0.33333333, 0.44444444,
0.55555556, 0.66666667, 0.77777778, 0.88888889, 1. ])
import matplotlib.pyplot as plt
plt.plot(x, f)
plt.xlabel("$x$", fontsize = 20)
plt.ylabel("$f(x) = x$", fontsize = 20)
plt.grid()
plt.show()
np.abs(f.ravel())
array([0. , 0.11111111, 0.22222222, 0.33333333, 0.44444444,
0.55555556, 0.66666667, 0.77777778, 0.88888889, 1. ])
f
array([0. , 0.11111111, 0.22222222, 0.33333333, 0.44444444,
0.55555556, 0.66666667, 0.77777778, 0.88888889, 1. ])
z = np.array([[1, 2, 3], [4, 5, 6]])
np.ravel(z)
array([1, 2, 3, 4, 5, 6])
np.ravel(z, order='F')
array([1, 4, 2, 5, 3, 6])
np.diff(x)[0]
0.1111111111111111
help(np.diff)
Help on function diff in module numpy:
diff(a, n=1, axis=-1, prepend=<no value>, append=<no value>)
Calculate the n-th discrete difference along the given axis.
The first difference is given by ``out[i] = a[i+1] - a[i]`` along
the given axis, higher differences are calculated by using `diff`
recursively.
Parameters
----------
a : array_like
Input array
n : int, optional
The number of times values are differenced. If zero, the input
is returned as-is.
axis : int, optional
The axis along which the difference is taken, default is the
last axis.
prepend, append : array_like, optional
Values to prepend or append to `a` along axis prior to
performing the difference. Scalar values are expanded to
arrays with length 1 in the direction of axis and the shape
of the input array in along all other axes. Otherwise the
dimension and shape must match `a` except along axis.
.. versionadded:: 1.16.0
Returns
-------
diff : ndarray
The n-th differences. The shape of the output is the same as `a`
except along `axis` where the dimension is smaller by `n`. The
type of the output is the same as the type of the difference
between any two elements of `a`. This is the same as the type of
`a` in most cases. A notable exception is `datetime64`, which
results in a `timedelta64` output array.
See Also
--------
gradient, ediff1d, cumsum
Notes
-----
Type is preserved for boolean arrays, so the result will contain
`False` when consecutive elements are the same and `True` when they
differ.
For unsigned integer arrays, the results will also be unsigned. This
should not be surprising, as the result is consistent with
calculating the difference directly:
>>> u8_arr = np.array([1, 0], dtype=np.uint8)
>>> np.diff(u8_arr)
array([255], dtype=uint8)
>>> u8_arr[1,...] - u8_arr[0,...]
255
If this is not desirable, then the array should be cast to a larger
integer type first:
>>> i16_arr = u8_arr.astype(np.int16)
>>> np.diff(i16_arr)
array([-1], dtype=int16)
Examples
--------
>>> x = np.array([1, 2, 4, 7, 0])
>>> np.diff(x)
array([ 1, 2, 3, -7])
>>> np.diff(x, n=2)
array([ 1, 1, -10])
>>> x = np.array([[1, 3, 6, 10], [0, 5, 6, 8]])
>>> np.diff(x)
array([[2, 3, 4],
[5, 1, 2]])
>>> np.diff(x, axis=0)
array([[-1, 2, 0, -2]])
>>> x = np.arange('1066-10-13', '1066-10-16', dtype=np.datetime64)
>>> np.diff(x)
array([1, 1], dtype='timedelta64[D]')
sum(np.abs(f.ravel())) * np.diff(x)[0]
0.5555555555555556
sum(f)*np.diff(x)[0]
0.5555555555555556
x = np.linspace(0, 1, 100)
f = x
sum(f)*np.diff(x)[0]
0.5050505050505051
Let $f(x,y) = e^{-(x^2+y^2)} \cdot \sin(x)$ for $-2 \leq x \leq 2$ and $-2 \leq y \leq 2$
#1
x = np.linspace(-2, 2, 1000)
y = np.linspace(-2, 2, 1000)
xv, yv = np.meshgrid(x, y)
f = np.exp(-xv**2-yv**2) * np.sin(xv)
plt.contourf(xv,yv,f, levels=10)
plt.colorbar()
<matplotlib.colorbar.Colorbar at 0x7faf1ac53250>
#2
sum(np.abs(f.ravel())) * np.diff(x)[0] * np.diff(y)[0]
1.4861858145125453
# 3
sum(np.abs(f[xv**2+yv**2>0.25].ravel())) * np.diff(x)[0] * np.diff(y)[0]
1.344765293020408
After examining a circuit full of resistors, you find that the voltage at 4 specified points is given by
$ 3V_1 + 2V_2 + 3V_3 + 10V_4 = 4$
$ 2V_1 - 2V_2 + 5V_3 + 8V_4 = 1$
$ 3V_1 + 3V_2 + 4V_3 + 9V_4 = 3$
$ 3V_1 + 4V_2 - 3V_3 - 7V_4 = 2$
Find all the voltages
A = np.array([[3, 2, 3, 10],[2,-2,5, 8],[3,3,4,9], [3,4,-3,-7]])
c = np.array([4,1,3,2])
np.linalg.solve(A,c)
array([ 0.78378378, 0.03603604, -0.67567568, 0.36036036])
# Test
print(3*0.78378378+2*0.03603604+3*(-0.67567568)+10*0.36036036)
print(2*0.78378378-2*0.03603604+5*(-0.67567568)+8*0.36036036)
print(3*0.78378378+3*0.03603604+4*(-0.67567568)+9*0.36036036)
print(3*0.78378378+4*0.03603604-3*(-0.67567568)-7*0.36036036)
3.9999999799999997 0.99999996 2.9999999799999997 2.0000000200000008
An electric field is given by $\vec{E}(z,t) = E_0 \cos (z-t) \hat{x} + 2E_0 \cos(z-t+\pi/2) \hat{y}$.
z = np.linspace(0, 4*np.pi, 100)
t = np.linspace(0, 10, 100)
tv, zv = np.meshgrid(t, z)
Ex = np.cos(zv-tv)
Ey = 2*np.cos(zv-tv+np.pi/2)
Ez = 0*zv
plt.plot(t, Ex[0])
plt.plot(t, Ey[0])
[<matplotlib.lines.Line2D at 0x7faf19e45430>]
plt.plot(Ex[:,0])
[<matplotlib.lines.Line2D at 0x7faf19e3a940>]
E = np.array([Ex, Ey, Ez])
E = np.swapaxes(E, 0, -1)
B = np.cross(np.array([0,0,1]), E)
E = np.swapaxes(E, 0, -1)
B = np.swapaxes(B, 0, -1)
Bx, By, Bz = B
plt.plot(t,Ey[0])
plt.plot(t,Bx[0])
[<matplotlib.lines.Line2D at 0x7faf1b35b880>]
S = np.cross(np.swapaxes(E, 0, -1), np.swapaxes(B, 0, -1))
S = np.swapaxes(S, 0, -1)
Sx, Sy, Sz = S
plt.plot(Sz[0])
[<matplotlib.lines.Line2D at 0x7faf19e51c10>]
Find the solutions to $\left(\frac{d^2}{dx^2} + (10x)^2\right) f = \lambda f$ with boundary conditions $f(0)=f(1)=0$
$\vec{f}_N = \begin{bmatrix} f_{1} \\ f_{2} \\ \vdots \\ f_{N} \end{bmatrix}$
f_{2}+0-2f_{1} \\
f_{3}+f_{1}-2f_{2} \\
\vdots \\
0+f_{N-1}-2f_N
\end{bmatrix}$
$
$
\left { \frac{1}{(\Delta x)^2} \begin{bmatrix} -2 & 1 & & &\\ 1 & -2 & 1 & & \\ & 1 & -2 & \ddots &\\ & & \ddots & \ddots& 1 \\ & & & 1 & -2 \end{bmatrix} + \begin{bmatrix} h_{1} & & &\\ & h_{2} & & \\ && \ddots & \\ && & h_{N} \end{bmatrix}\right } \begin{bmatrix} f_{1} \\ f_{2} \\ f_{3} \\ \vdots \\ f_{N} \end{bmatrix} \ =\lambda f(x)$
import numpy as np
N = 1000
x = np.linspace(0,1,N+1)
dx = x[1]-x[0]
main_diag = -2*np.ones(N-1)
off_diag = np.ones(N-2)
derivative_matrix = (np.diag(main_diag) + np.diag(off_diag, k=1)+ np.diag(off_diag, k=-1))/dx**2
np.diag(main_diag)
array([[-2., 0., 0., ..., 0., 0., 0.],
[ 0., -2., 0., ..., 0., 0., 0.],
[ 0., 0., -2., ..., 0., 0., 0.],
...,
[ 0., 0., 0., ..., -2., 0., 0.],
[ 0., 0., 0., ..., 0., -2., 0.],
[ 0., 0., 0., ..., 0., 0., -2.]])
np.diag(off_diag, 1)
array([[0., 1., 0., ..., 0., 0., 0.],
[0., 0., 1., ..., 0., 0., 0.],
[0., 0., 0., ..., 0., 0., 0.],
...,
[0., 0., 0., ..., 0., 1., 0.],
[0., 0., 0., ..., 0., 0., 1.],
[0., 0., 0., ..., 0., 0., 0.]])
np.diag(off_diag, -1)
array([[0., 0., 0., ..., 0., 0., 0.],
[1., 0., 0., ..., 0., 0., 0.],
[0., 1., 0., ..., 0., 0., 0.],
...,
[0., 0., 0., ..., 0., 0., 0.],
[0., 0., 0., ..., 1., 0., 0.],
[0., 0., 0., ..., 0., 1., 0.]])
derivative_matrix
array([[-2000000., 1000000., 0., ..., 0., 0.,
0.],
[ 1000000., -2000000., 1000000., ..., 0., 0.,
0.],
[ 0., 1000000., -2000000., ..., 0., 0.,
0.],
...,
[ 0., 0., 0., ..., -2000000., 1000000.,
0.],
[ 0., 0., 0., ..., 1000000., -2000000.,
1000000.],
[ 0., 0., 0., ..., 0., 1000000.,
-2000000.]])
x2_matrix = np.diag((10*x[1:-1])**2)
x2_matrix
array([[1.00000e-04, 0.00000e+00, 0.00000e+00, ..., 0.00000e+00,
0.00000e+00, 0.00000e+00],
[0.00000e+00, 4.00000e-04, 0.00000e+00, ..., 0.00000e+00,
0.00000e+00, 0.00000e+00],
[0.00000e+00, 0.00000e+00, 9.00000e-04, ..., 0.00000e+00,
0.00000e+00, 0.00000e+00],
...,
[0.00000e+00, 0.00000e+00, 0.00000e+00, ..., 9.94009e+01,
0.00000e+00, 0.00000e+00],
[0.00000e+00, 0.00000e+00, 0.00000e+00, ..., 0.00000e+00,
9.96004e+01, 0.00000e+00],
[0.00000e+00, 0.00000e+00, 0.00000e+00, ..., 0.00000e+00,
0.00000e+00, 9.98001e+01]])
LHS_matrix = derivative_matrix #+ x2_matrix
LHS_matrix
array([[-2000000., 1000000., 0., ..., 0., 0.,
0.],
[ 1000000., -2000000., 1000000., ..., 0., 0.,
0.],
[ 0., 1000000., -2000000., ..., 0., 0.,
0.],
...,
[ 0., 0., 0., ..., -2000000., 1000000.,
0.],
[ 0., 0., 0., ..., 1000000., -2000000.,
1000000.],
[ 0., 0., 0., ..., 0., 1000000.,
-2000000.]])
w, v = np.linalg.eigh(LHS_matrix)
w, v
(array([-3.99999013e+06, -3.99996052e+06, -3.99991117e+06, -3.99984209e+06,
-3.99975326e+06, -3.99964470e+06, -3.99951641e+06, -3.99936838e+06,
-3.99920062e+06, -3.99901312e+06, -3.99880590e+06, -3.99857895e+06,
-3.99833227e+06, -3.99806587e+06, -3.99777975e+06, -3.99747391e+06,
-3.99714836e+06, -3.99680310e+06, -3.99643813e+06, -3.99605346e+06,
-3.99564908e+06, -3.99522501e+06, -3.99478125e+06, -3.99431780e+06,
-3.99383467e+06, -3.99333186e+06, -3.99280937e+06, -3.99226722e+06,
-3.99170540e+06, -3.99112393e+06, -3.99052280e+06, -3.98990203e+06,
-3.98926162e+06, -3.98860158e+06, -3.98792191e+06, -3.98722262e+06,
-3.98650372e+06, -3.98576521e+06, -3.98500710e+06, -3.98422940e+06,
-3.98343212e+06, -3.98261526e+06, -3.98177884e+06, -3.98092285e+06,
-3.98004732e+06, -3.97915224e+06, -3.97823763e+06, -3.97730349e+06,
-3.97634984e+06, -3.97537668e+06, -3.97438403e+06, -3.97337189e+06,
-3.97234027e+06, -3.97128919e+06, -3.97021865e+06, -3.96912867e+06,
-3.96801925e+06, -3.96689041e+06, -3.96574216e+06, -3.96457450e+06,
-3.96338746e+06, -3.96218103e+06, -3.96095525e+06, -3.95971010e+06,
-3.95844562e+06, -3.95716181e+06, -3.95585868e+06, -3.95453625e+06,
-3.95319452e+06, -3.95183352e+06, -3.95045326e+06, -3.94905375e+06,
-3.94763499e+06, -3.94619702e+06, -3.94473984e+06, -3.94326347e+06,
-3.94176791e+06, -3.94025319e+06, -3.93871932e+06, -3.93716632e+06,
-3.93559420e+06, -3.93400298e+06, -3.93239266e+06, -3.93076328e+06,
-3.92911484e+06, -3.92744736e+06, -3.92576085e+06, -3.92405534e+06,
-3.92233084e+06, -3.92058737e+06, -3.91882494e+06, -3.91704358e+06,
-3.91524329e+06, -3.91342410e+06, -3.91158603e+06, -3.90972909e+06,
-3.90785330e+06, -3.90595868e+06, -3.90404525e+06, -3.90211303e+06,
-3.90016204e+06, -3.89819229e+06, -3.89620381e+06, -3.89419661e+06,
-3.89217072e+06, -3.89012615e+06, -3.88806293e+06, -3.88598107e+06,
-3.88388060e+06, -3.88176154e+06, -3.87962390e+06, -3.87746772e+06,
-3.87529300e+06, -3.87309977e+06, -3.87088806e+06, -3.86865788e+06,
-3.86640927e+06, -3.86414222e+06, -3.86185679e+06, -3.85955297e+06,
-3.85723080e+06, -3.85489031e+06, -3.85253150e+06, -3.85015441e+06,
-3.84775907e+06, -3.84534548e+06, -3.84291368e+06, -3.84046369e+06,
-3.83799554e+06, -3.83550925e+06, -3.83300484e+06, -3.83048235e+06,
-3.82794178e+06, -3.82538317e+06, -3.82280655e+06, -3.82021194e+06,
-3.81759936e+06, -3.81496885e+06, -3.81232042e+06, -3.80965410e+06,
-3.80696993e+06, -3.80426792e+06, -3.80154810e+06, -3.79881050e+06,
-3.79605515e+06, -3.79328207e+06, -3.79049130e+06, -3.78768285e+06,
-3.78485676e+06, -3.78201305e+06, -3.77915175e+06, -3.77627290e+06,
-3.77337651e+06, -3.77046262e+06, -3.76753126e+06, -3.76458245e+06,
-3.76161623e+06, -3.75863262e+06, -3.75563165e+06, -3.75261336e+06,
-3.74957777e+06, -3.74652491e+06, -3.74345481e+06, -3.74036751e+06,
-3.73726303e+06, -3.73414140e+06, -3.73100266e+06, -3.72784683e+06,
-3.72467396e+06, -3.72148405e+06, -3.71827716e+06, -3.71505331e+06,
-3.71181254e+06, -3.70855486e+06, -3.70528033e+06, -3.70198896e+06,
-3.69868080e+06, -3.69535587e+06, -3.69201421e+06, -3.68865585e+06,
-3.68528082e+06, -3.68188916e+06, -3.67848091e+06, -3.67505608e+06,
-3.67161472e+06, -3.66815687e+06, -3.66468255e+06, -3.66119180e+06,
-3.65768465e+06, -3.65416115e+06, -3.65062132e+06, -3.64706520e+06,
-3.64349282e+06, -3.63990422e+06, -3.63629943e+06, -3.63267850e+06,
-3.62904145e+06, -3.62538833e+06, -3.62171916e+06, -3.61803399e+06,
-3.61433285e+06, -3.61061577e+06, -3.60688280e+06, -3.60313397e+06,
-3.59936932e+06, -3.59558888e+06, -3.59179269e+06, -3.58798080e+06,
-3.58415323e+06, -3.58031002e+06, -3.57645122e+06, -3.57257686e+06,
-3.56868698e+06, -3.56478162e+06, -3.56086081e+06, -3.55692460e+06,
-3.55297303e+06, -3.54900612e+06, -3.54502393e+06, -3.54102649e+06,
-3.53701383e+06, -3.53298601e+06, -3.52894306e+06, -3.52488502e+06,
-3.52081193e+06, -3.51672383e+06, -3.51262076e+06, -3.50850276e+06,
-3.50436987e+06, -3.50022214e+06, -3.49605960e+06, -3.49188229e+06,
-3.48769026e+06, -3.48348355e+06, -3.47926219e+06, -3.47502623e+06,
-3.47077572e+06, -3.46651069e+06, -3.46223119e+06, -3.45793725e+06,
-3.45362893e+06, -3.44930626e+06, -3.44496929e+06, -3.44061805e+06,
-3.43625260e+06, -3.43187297e+06, -3.42747920e+06, -3.42307135e+06,
-3.41864946e+06, -3.41421356e+06, -3.40976371e+06, -3.40529994e+06,
-3.40082230e+06, -3.39633084e+06, -3.39182559e+06, -3.38730661e+06,
-3.38277394e+06, -3.37822762e+06, -3.37366769e+06, -3.36909421e+06,
-3.36450722e+06, -3.35990676e+06, -3.35529287e+06, -3.35066562e+06,
-3.34602503e+06, -3.34137115e+06, -3.33670404e+06, -3.33202373e+06,
-3.32733028e+06, -3.32262373e+06, -3.31790412e+06, -3.31317151e+06,
-3.30842594e+06, -3.30366745e+06, -3.29889610e+06, -3.29411192e+06,
-3.28931498e+06, -3.28450531e+06, -3.27968296e+06, -3.27484798e+06,
-3.27000042e+06, -3.26514032e+06, -3.26026774e+06, -3.25538272e+06,
-3.25048531e+06, -3.24557556e+06, -3.24065352e+06, -3.23571923e+06,
-3.23077274e+06, -3.22581411e+06, -3.22084338e+06, -3.21586060e+06,
-3.21086581e+06, -3.20585908e+06, -3.20084045e+06, -3.19580997e+06,
-3.19076768e+06, -3.18571364e+06, -3.18064790e+06, -3.17557050e+06,
-3.17048151e+06, -3.16538096e+06, -3.16026891e+06, -3.15514541e+06,
-3.15001050e+06, -3.14486425e+06, -3.13970670e+06, -3.13453790e+06,
-3.12935790e+06, -3.12416676e+06, -3.11896452e+06, -3.11375123e+06,
-3.10852696e+06, -3.10329174e+06, -3.09804564e+06, -3.09278869e+06,
-3.08752097e+06, -3.08224250e+06, -3.07695336e+06, -3.07165359e+06,
-3.06634324e+06, -3.06102237e+06, -3.05569102e+06, -3.05034926e+06,
-3.04499713e+06, -3.03963469e+06, -3.03426198e+06, -3.02887907e+06,
-3.02348600e+06, -3.01808283e+06, -3.01266961e+06, -3.00724640e+06,
-3.00181325e+06, -2.99637021e+06, -2.99091734e+06, -2.98545468e+06,
-2.97998230e+06, -2.97450025e+06, -2.96900858e+06, -2.96350735e+06,
-2.95799661e+06, -2.95247641e+06, -2.94694681e+06, -2.94140786e+06,
-2.93585963e+06, -2.93030216e+06, -2.92473550e+06, -2.91915972e+06,
-2.91357487e+06, -2.90798100e+06, -2.90237817e+06, -2.89676643e+06,
-2.89114584e+06, -2.88551646e+06, -2.87987834e+06, -2.87423153e+06,
-2.86857610e+06, -2.86291209e+06, -2.85723957e+06, -2.85155858e+06,
-2.84586919e+06, -2.84017146e+06, -2.83446543e+06, -2.82875116e+06,
-2.82302872e+06, -2.81729815e+06, -2.81155952e+06, -2.80581287e+06,
-2.80005827e+06, -2.79429578e+06, -2.78852545e+06, -2.78274733e+06,
-2.77696149e+06, -2.77116798e+06, -2.76536686e+06, -2.75955819e+06,
-2.75374202e+06, -2.74791841e+06, -2.74208742e+06, -2.73624911e+06,
-2.73040352e+06, -2.72455073e+06, -2.71869079e+06, -2.71282376e+06,
-2.70694969e+06, -2.70106864e+06, -2.69518067e+06, -2.68928585e+06,
-2.68338422e+06, -2.67747584e+06, -2.67156078e+06, -2.66563909e+06,
-2.65971083e+06, -2.65377606e+06, -2.64783484e+06, -2.64188722e+06,
-2.63593327e+06, -2.62997304e+06, -2.62400659e+06, -2.61803399e+06,
-2.61205528e+06, -2.60607054e+06, -2.60007981e+06, -2.59408316e+06,
-2.58808065e+06, -2.58207233e+06, -2.57605827e+06, -2.57003852e+06,
-2.56401315e+06, -2.55798221e+06, -2.55194577e+06, -2.54590387e+06,
-2.53985659e+06, -2.53380398e+06, -2.52774610e+06, -2.52168301e+06,
-2.51561478e+06, -2.50954145e+06, -2.50346310e+06, -2.49737977e+06,
-2.49129154e+06, -2.48519846e+06, -2.47910059e+06, -2.47299799e+06,
-2.46689073e+06, -2.46077885e+06, -2.45466243e+06, -2.44854152e+06,
-2.44241619e+06, -2.43628648e+06, -2.43015247e+06, -2.42401422e+06,
-2.41787178e+06, -2.41172522e+06, -2.40557459e+06, -2.39941996e+06,
-2.39326139e+06, -2.38709894e+06, -2.38093266e+06, -2.37476263e+06,
-2.36858890e+06, -2.36241153e+06, -2.35623058e+06, -2.35004612e+06,
-2.34385820e+06, -2.33766689e+06, -2.33147225e+06, -2.32527433e+06,
-2.31907320e+06, -2.31286893e+06, -2.30666157e+06, -2.30045118e+06,
-2.29423782e+06, -2.28802157e+06, -2.28180246e+06, -2.27558058e+06,
-2.26935598e+06, -2.26312872e+06, -2.25689886e+06, -2.25066647e+06,
-2.24443160e+06, -2.23819432e+06, -2.23195469e+06, -2.22571277e+06,
-2.21946862e+06, -2.21322231e+06, -2.20697389e+06, -2.20072343e+06,
-2.19447099e+06, -2.18821663e+06, -2.18196041e+06, -2.17570239e+06,
-2.16944264e+06, -2.16318122e+06, -2.15691819e+06, -2.15065361e+06,
-2.14438754e+06, -2.13812005e+06, -2.13185120e+06, -2.12558104e+06,
-2.11930964e+06, -2.11303707e+06, -2.10676338e+06, -2.10048864e+06,
-2.09421290e+06, -2.08793624e+06, -2.08165870e+06, -2.07538037e+06,
-2.06910128e+06, -2.06282152e+06, -2.05654113e+06, -2.05026019e+06,
-2.04397875e+06, -2.03769688e+06, -2.03141463e+06, -2.02513208e+06,
-2.01884928e+06, -2.01256629e+06, -2.00628317e+06, -2.00000000e+06,
-1.99371683e+06, -1.98743371e+06, -1.98115072e+06, -1.97486792e+06,
-1.96858537e+06, -1.96230312e+06, -1.95602125e+06, -1.94973981e+06,
-1.94345887e+06, -1.93717848e+06, -1.93089872e+06, -1.92461963e+06,
-1.91834130e+06, -1.91206376e+06, -1.90578710e+06, -1.89951136e+06,
-1.89323662e+06, -1.88696293e+06, -1.88069036e+06, -1.87441896e+06,
-1.86814880e+06, -1.86187995e+06, -1.85561246e+06, -1.84934639e+06,
-1.84308181e+06, -1.83681878e+06, -1.83055736e+06, -1.82429761e+06,
-1.81803959e+06, -1.81178337e+06, -1.80552901e+06, -1.79927657e+06,
-1.79302611e+06, -1.78677769e+06, -1.78053138e+06, -1.77428723e+06,
-1.76804531e+06, -1.76180568e+06, -1.75556840e+06, -1.74933353e+06,
-1.74310114e+06, -1.73687128e+06, -1.73064402e+06, -1.72441942e+06,
-1.71819754e+06, -1.71197843e+06, -1.70576218e+06, -1.69954882e+06,
-1.69333843e+06, -1.68713107e+06, -1.68092680e+06, -1.67472567e+06,
-1.66852775e+06, -1.66233311e+06, -1.65614180e+06, -1.64995388e+06,
-1.64376942e+06, -1.63758847e+06, -1.63141110e+06, -1.62523737e+06,
-1.61906734e+06, -1.61290106e+06, -1.60673861e+06, -1.60058004e+06,
-1.59442541e+06, -1.58827478e+06, -1.58212822e+06, -1.57598578e+06,
-1.56984753e+06, -1.56371352e+06, -1.55758381e+06, -1.55145848e+06,
-1.54533757e+06, -1.53922115e+06, -1.53310927e+06, -1.52700201e+06,
-1.52089941e+06, -1.51480154e+06, -1.50870846e+06, -1.50262023e+06,
-1.49653690e+06, -1.49045855e+06, -1.48438522e+06, -1.47831699e+06,
-1.47225390e+06, -1.46619602e+06, -1.46014341e+06, -1.45409613e+06,
-1.44805423e+06, -1.44201779e+06, -1.43598685e+06, -1.42996148e+06,
-1.42394173e+06, -1.41792767e+06, -1.41191935e+06, -1.40591684e+06,
-1.39992019e+06, -1.39392946e+06, -1.38794472e+06, -1.38196601e+06,
-1.37599341e+06, -1.37002696e+06, -1.36406673e+06, -1.35811278e+06,
-1.35216516e+06, -1.34622394e+06, -1.34028917e+06, -1.33436091e+06,
-1.32843922e+06, -1.32252416e+06, -1.31661578e+06, -1.31071415e+06,
-1.30481933e+06, -1.29893136e+06, -1.29305031e+06, -1.28717624e+06,
-1.28130921e+06, -1.27544927e+06, -1.26959648e+06, -1.26375089e+06,
-1.25791258e+06, -1.25208159e+06, -1.24625798e+06, -1.24044181e+06,
-1.23463314e+06, -1.22883202e+06, -1.22303851e+06, -1.21725267e+06,
-1.21147455e+06, -1.20570422e+06, -1.19994173e+06, -1.19418713e+06,
-1.18844048e+06, -1.18270185e+06, -1.17697128e+06, -1.17124884e+06,
-1.16553457e+06, -1.15982854e+06, -1.15413081e+06, -1.14844142e+06,
-1.14276043e+06, -1.13708791e+06, -1.13142390e+06, -1.12576847e+06,
-1.12012166e+06, -1.11448354e+06, -1.10885416e+06, -1.10323357e+06,
-1.09762183e+06, -1.09201900e+06, -1.08642513e+06, -1.08084028e+06,
-1.07526450e+06, -1.06969784e+06, -1.06414037e+06, -1.05859214e+06,
-1.05305319e+06, -1.04752359e+06, -1.04200339e+06, -1.03649265e+06,
-1.03099142e+06, -1.02549975e+06, -1.02001770e+06, -1.01454532e+06,
-1.00908266e+06, -1.00362979e+06, -9.98186749e+05, -9.92753597e+05,
-9.87330385e+05, -9.81917168e+05, -9.76514000e+05, -9.71120932e+05,
-9.65738020e+05, -9.60365315e+05, -9.55002871e+05, -9.49650740e+05,
-9.44308976e+05, -9.38977631e+05, -9.33656759e+05, -9.28346410e+05,
-9.23046638e+05, -9.17757496e+05, -9.12479034e+05, -9.07211307e+05,
-9.01954364e+05, -8.96708259e+05, -8.91473043e+05, -8.86248767e+05,
-8.81035484e+05, -8.75833244e+05, -8.70642100e+05, -8.65462102e+05,
-8.60293301e+05, -8.55135749e+05, -8.49989496e+05, -8.44854593e+05,
-8.39731091e+05, -8.34619041e+05, -8.29518492e+05, -8.24429495e+05,
-8.19352101e+05, -8.14286360e+05, -8.09232321e+05, -8.04190034e+05,
-7.99159549e+05, -7.94140917e+05, -7.89134185e+05, -7.84139405e+05,
-7.79156624e+05, -7.74185893e+05, -7.69227260e+05, -7.64280774e+05,
-7.59346484e+05, -7.54424439e+05, -7.49514687e+05, -7.44617277e+05,
-7.39732258e+05, -7.34859676e+05, -7.29999581e+05, -7.25152021e+05,
-7.20317042e+05, -7.15494694e+05, -7.10685023e+05, -7.05888077e+05,
-7.01103903e+05, -6.96332549e+05, -6.91574062e+05, -6.86828488e+05,
-6.82095875e+05, -6.77376269e+05, -6.72669717e+05, -6.67976265e+05,
-6.63295960e+05, -6.58628847e+05, -6.53974973e+05, -6.49334384e+05,
-6.44707125e+05, -6.40093243e+05, -6.35492782e+05, -6.30905788e+05,
-6.26332307e+05, -6.21772383e+05, -6.17226062e+05, -6.12693388e+05,
-6.08174407e+05, -6.03669162e+05, -5.99177698e+05, -5.94700060e+05,
-5.90236292e+05, -5.85786438e+05, -5.81350541e+05, -5.76928646e+05,
-5.72520795e+05, -5.68127034e+05, -5.63747404e+05, -5.59381950e+05,
-5.55030714e+05, -5.50693740e+05, -5.46371069e+05, -5.42062745e+05,
-5.37768811e+05, -5.33489308e+05, -5.29224278e+05, -5.24973765e+05,
-5.20737810e+05, -5.16516455e+05, -5.12309740e+05, -5.08117709e+05,
-5.03940402e+05, -4.99777861e+05, -4.95630126e+05, -4.91497239e+05,
-4.87379239e+05, -4.83276169e+05, -4.79188069e+05, -4.75114978e+05,
-4.71056937e+05, -4.67013986e+05, -4.62986166e+05, -4.58973514e+05,
-4.54976073e+05, -4.50993880e+05, -4.47026975e+05, -4.43075397e+05,
-4.39139185e+05, -4.35218379e+05, -4.31313016e+05, -4.27423136e+05,
-4.23548776e+05, -4.19689975e+05, -4.15846772e+05, -4.12019203e+05,
-4.08207307e+05, -4.04411121e+05, -4.00630683e+05, -3.96866030e+05,
-3.93117200e+05, -3.89384229e+05, -3.85667154e+05, -3.81966011e+05,
-3.78280838e+05, -3.74611671e+05, -3.70958546e+05, -3.67321499e+05,
-3.63700565e+05, -3.60095781e+05, -3.56507183e+05, -3.52934805e+05,
-3.49378683e+05, -3.45838851e+05, -3.42315346e+05, -3.38808202e+05,
-3.35317452e+05, -3.31843133e+05, -3.28385277e+05, -3.24943920e+05,
-3.21519095e+05, -3.18110835e+05, -3.14719176e+05, -3.11344149e+05,
-3.07985789e+05, -3.04644128e+05, -3.01319199e+05, -2.98011036e+05,
-2.94719671e+05, -2.91445137e+05, -2.88187465e+05, -2.84946688e+05,
-2.81722837e+05, -2.78515946e+05, -2.75326045e+05, -2.72153166e+05,
-2.68997339e+05, -2.65858598e+05, -2.62736971e+05, -2.59632491e+05,
-2.56545187e+05, -2.53475090e+05, -2.50422231e+05, -2.47386640e+05,
-2.44368346e+05, -2.41367380e+05, -2.38383770e+05, -2.35417547e+05,
-2.32468740e+05, -2.29537377e+05, -2.26623489e+05, -2.23727102e+05,
-2.20848247e+05, -2.17986952e+05, -2.15143244e+05, -2.12317152e+05,
-2.09508703e+05, -2.06717926e+05, -2.03944848e+05, -2.01189497e+05,
-1.98451899e+05, -1.95732081e+05, -1.93030071e+05, -1.90345895e+05,
-1.87679580e+05, -1.85031151e+05, -1.82400635e+05, -1.79788059e+05,
-1.77193447e+05, -1.74616825e+05, -1.72058219e+05, -1.69517655e+05,
-1.66995156e+05, -1.64490749e+05, -1.62004457e+05, -1.59536305e+05,
-1.57086318e+05, -1.54654520e+05, -1.52240935e+05, -1.49845586e+05,
-1.47468498e+05, -1.45109693e+05, -1.42769196e+05, -1.40447028e+05,
-1.38143214e+05, -1.35857775e+05, -1.33590735e+05, -1.31342115e+05,
-1.29111938e+05, -1.26900227e+05, -1.24707001e+05, -1.22532285e+05,
-1.20376098e+05, -1.18238462e+05, -1.16119399e+05, -1.14018928e+05,
-1.11937072e+05, -1.09873850e+05, -1.07829282e+05, -1.05803390e+05,
-1.03796193e+05, -1.01807710e+05, -9.98379618e+04, -9.78869674e+04,
-9.59547461e+04, -9.40413170e+04, -9.21466989e+04, -9.02709105e+04,
-8.84139704e+04, -8.65758969e+04, -8.47567081e+04, -8.29564220e+04,
-8.11750563e+04, -7.94126286e+04, -7.76691564e+04, -7.59446568e+04,
-7.42391469e+04, -7.25526434e+04, -7.08851631e+04, -6.92367223e+04,
-6.76073374e+04, -6.59970245e+04, -6.44057993e+04, -6.28336777e+04,
-6.12806752e+04, -5.97468070e+04, -5.82320884e+04, -5.67365342e+04,
-5.52601592e+04, -5.38029780e+04, -5.23650050e+04, -5.09462544e+04,
-4.95467402e+04, -4.81664761e+04, -4.68054759e+04, -4.54637529e+04,
-4.41413203e+04, -4.28381913e+04, -4.15543788e+04, -4.02898952e+04,
-3.90447533e+04, -3.78189651e+04, -3.66125429e+04, -3.54254985e+04,
-3.42578437e+04, -3.31095900e+04, -3.19807487e+04, -3.08713309e+04,
-2.97813477e+04, -2.87108097e+04, -2.76597275e+04, -2.66281116e+04,
-2.56159720e+04, -2.46233188e+04, -2.36501618e+04, -2.26965105e+04,
-2.17623745e+04, -2.08477628e+04, -1.99526846e+04, -1.90771486e+04,
-1.82211636e+04, -1.73847379e+04, -1.65678798e+04, -1.57705974e+04,
-1.49928985e+04, -1.42347909e+04, -1.34962819e+04, -1.27773790e+04,
-1.20780891e+04, -1.13984192e+04, -1.07383760e+04, -1.00979660e+04,
-9.47719559e+03, -8.87607079e+03, -8.29459759e+03, -7.73278171e+03,
-7.19062871e+03, -6.66814393e+03, -6.16533253e+03, -5.68219948e+03,
-5.21874954e+03, -4.77498728e+03, -4.35091709e+03, -3.94654314e+03,
-3.56186944e+03, -3.19689978e+03, -2.85163776e+03, -2.52608679e+03,
-2.22025008e+03, -1.93413064e+03, -1.66773131e+03, -1.42105472e+03,
-1.19410329e+03, -9.86879269e+02, -7.99384699e+02, -6.31621433e+02,
-4.83591126e+02, -3.55295238e+02, -2.46735037e+02, -1.57911592e+02,
-8.88257821e+01, -3.94782877e+01, -9.86959628e+00]),
array([[ 0.0001405 , -0.00028099, -0.00042148, ..., 0.00042148,
-0.00028099, -0.0001405 ],
[-0.00028099, 0.00056197, 0.00084293, ..., 0.00084293,
-0.00056197, -0.00028099],
[ 0.00042148, -0.00084293, -0.0012643 , ..., 0.0012643 ,
-0.00084293, -0.00042148],
...,
[ 0.00042148, 0.00084293, -0.0012643 , ..., 0.0012643 ,
0.00084293, -0.00042148],
[-0.00028099, -0.00056197, 0.00084293, ..., 0.00084293,
0.00056197, -0.00028099],
[ 0.0001405 , 0.00028099, -0.00042148, ..., 0.00042148,
0.00028099, -0.0001405 ]]))
w
array([-3.99999013e+06, -3.99996052e+06, -3.99991117e+06, -3.99984209e+06,
-3.99975326e+06, -3.99964470e+06, -3.99951641e+06, -3.99936838e+06,
-3.99920062e+06, -3.99901312e+06, -3.99880590e+06, -3.99857895e+06,
-3.99833227e+06, -3.99806587e+06, -3.99777975e+06, -3.99747391e+06,
-3.99714836e+06, -3.99680310e+06, -3.99643813e+06, -3.99605346e+06,
-3.99564908e+06, -3.99522501e+06, -3.99478125e+06, -3.99431780e+06,
-3.99383467e+06, -3.99333186e+06, -3.99280937e+06, -3.99226722e+06,
-3.99170540e+06, -3.99112393e+06, -3.99052280e+06, -3.98990203e+06,
-3.98926162e+06, -3.98860158e+06, -3.98792191e+06, -3.98722262e+06,
-3.98650372e+06, -3.98576521e+06, -3.98500710e+06, -3.98422940e+06,
-3.98343212e+06, -3.98261526e+06, -3.98177884e+06, -3.98092285e+06,
-3.98004732e+06, -3.97915224e+06, -3.97823763e+06, -3.97730349e+06,
-3.97634984e+06, -3.97537668e+06, -3.97438403e+06, -3.97337189e+06,
-3.97234027e+06, -3.97128919e+06, -3.97021865e+06, -3.96912867e+06,
-3.96801925e+06, -3.96689041e+06, -3.96574216e+06, -3.96457450e+06,
-3.96338746e+06, -3.96218103e+06, -3.96095525e+06, -3.95971010e+06,
-3.95844562e+06, -3.95716181e+06, -3.95585868e+06, -3.95453625e+06,
-3.95319452e+06, -3.95183352e+06, -3.95045326e+06, -3.94905375e+06,
-3.94763499e+06, -3.94619702e+06, -3.94473984e+06, -3.94326347e+06,
-3.94176791e+06, -3.94025319e+06, -3.93871932e+06, -3.93716632e+06,
-3.93559420e+06, -3.93400298e+06, -3.93239266e+06, -3.93076328e+06,
-3.92911484e+06, -3.92744736e+06, -3.92576085e+06, -3.92405534e+06,
-3.92233084e+06, -3.92058737e+06, -3.91882494e+06, -3.91704358e+06,
-3.91524329e+06, -3.91342410e+06, -3.91158603e+06, -3.90972909e+06,
-3.90785330e+06, -3.90595868e+06, -3.90404525e+06, -3.90211303e+06,
-3.90016204e+06, -3.89819229e+06, -3.89620381e+06, -3.89419661e+06,
-3.89217072e+06, -3.89012615e+06, -3.88806293e+06, -3.88598107e+06,
-3.88388060e+06, -3.88176154e+06, -3.87962390e+06, -3.87746772e+06,
-3.87529300e+06, -3.87309977e+06, -3.87088806e+06, -3.86865788e+06,
-3.86640927e+06, -3.86414222e+06, -3.86185679e+06, -3.85955297e+06,
-3.85723080e+06, -3.85489031e+06, -3.85253150e+06, -3.85015441e+06,
-3.84775907e+06, -3.84534548e+06, -3.84291368e+06, -3.84046369e+06,
-3.83799554e+06, -3.83550925e+06, -3.83300484e+06, -3.83048235e+06,
-3.82794178e+06, -3.82538317e+06, -3.82280655e+06, -3.82021194e+06,
-3.81759936e+06, -3.81496885e+06, -3.81232042e+06, -3.80965410e+06,
-3.80696993e+06, -3.80426792e+06, -3.80154810e+06, -3.79881050e+06,
-3.79605515e+06, -3.79328207e+06, -3.79049130e+06, -3.78768285e+06,
-3.78485676e+06, -3.78201305e+06, -3.77915175e+06, -3.77627290e+06,
-3.77337651e+06, -3.77046262e+06, -3.76753126e+06, -3.76458245e+06,
-3.76161623e+06, -3.75863262e+06, -3.75563165e+06, -3.75261336e+06,
-3.74957777e+06, -3.74652491e+06, -3.74345481e+06, -3.74036751e+06,
-3.73726303e+06, -3.73414140e+06, -3.73100266e+06, -3.72784683e+06,
-3.72467396e+06, -3.72148405e+06, -3.71827716e+06, -3.71505331e+06,
-3.71181254e+06, -3.70855486e+06, -3.70528033e+06, -3.70198896e+06,
-3.69868080e+06, -3.69535587e+06, -3.69201421e+06, -3.68865585e+06,
-3.68528082e+06, -3.68188916e+06, -3.67848091e+06, -3.67505608e+06,
-3.67161472e+06, -3.66815687e+06, -3.66468255e+06, -3.66119180e+06,
-3.65768465e+06, -3.65416115e+06, -3.65062132e+06, -3.64706520e+06,
-3.64349282e+06, -3.63990422e+06, -3.63629943e+06, -3.63267850e+06,
-3.62904145e+06, -3.62538833e+06, -3.62171916e+06, -3.61803399e+06,
-3.61433285e+06, -3.61061577e+06, -3.60688280e+06, -3.60313397e+06,
-3.59936932e+06, -3.59558888e+06, -3.59179269e+06, -3.58798080e+06,
-3.58415323e+06, -3.58031002e+06, -3.57645122e+06, -3.57257686e+06,
-3.56868698e+06, -3.56478162e+06, -3.56086081e+06, -3.55692460e+06,
-3.55297303e+06, -3.54900612e+06, -3.54502393e+06, -3.54102649e+06,
-3.53701383e+06, -3.53298601e+06, -3.52894306e+06, -3.52488502e+06,
-3.52081193e+06, -3.51672383e+06, -3.51262076e+06, -3.50850276e+06,
-3.50436987e+06, -3.50022214e+06, -3.49605960e+06, -3.49188229e+06,
-3.48769026e+06, -3.48348355e+06, -3.47926219e+06, -3.47502623e+06,
-3.47077572e+06, -3.46651069e+06, -3.46223119e+06, -3.45793725e+06,
-3.45362893e+06, -3.44930626e+06, -3.44496929e+06, -3.44061805e+06,
-3.43625260e+06, -3.43187297e+06, -3.42747920e+06, -3.42307135e+06,
-3.41864946e+06, -3.41421356e+06, -3.40976371e+06, -3.40529994e+06,
-3.40082230e+06, -3.39633084e+06, -3.39182559e+06, -3.38730661e+06,
-3.38277394e+06, -3.37822762e+06, -3.37366769e+06, -3.36909421e+06,
-3.36450722e+06, -3.35990676e+06, -3.35529287e+06, -3.35066562e+06,
-3.34602503e+06, -3.34137115e+06, -3.33670404e+06, -3.33202373e+06,
-3.32733028e+06, -3.32262373e+06, -3.31790412e+06, -3.31317151e+06,
-3.30842594e+06, -3.30366745e+06, -3.29889610e+06, -3.29411192e+06,
-3.28931498e+06, -3.28450531e+06, -3.27968296e+06, -3.27484798e+06,
-3.27000042e+06, -3.26514032e+06, -3.26026774e+06, -3.25538272e+06,
-3.25048531e+06, -3.24557556e+06, -3.24065352e+06, -3.23571923e+06,
-3.23077274e+06, -3.22581411e+06, -3.22084338e+06, -3.21586060e+06,
-3.21086581e+06, -3.20585908e+06, -3.20084045e+06, -3.19580997e+06,
-3.19076768e+06, -3.18571364e+06, -3.18064790e+06, -3.17557050e+06,
-3.17048151e+06, -3.16538096e+06, -3.16026891e+06, -3.15514541e+06,
-3.15001050e+06, -3.14486425e+06, -3.13970670e+06, -3.13453790e+06,
-3.12935790e+06, -3.12416676e+06, -3.11896452e+06, -3.11375123e+06,
-3.10852696e+06, -3.10329174e+06, -3.09804564e+06, -3.09278869e+06,
-3.08752097e+06, -3.08224250e+06, -3.07695336e+06, -3.07165359e+06,
-3.06634324e+06, -3.06102237e+06, -3.05569102e+06, -3.05034926e+06,
-3.04499713e+06, -3.03963469e+06, -3.03426198e+06, -3.02887907e+06,
-3.02348600e+06, -3.01808283e+06, -3.01266961e+06, -3.00724640e+06,
-3.00181325e+06, -2.99637021e+06, -2.99091734e+06, -2.98545468e+06,
-2.97998230e+06, -2.97450025e+06, -2.96900858e+06, -2.96350735e+06,
-2.95799661e+06, -2.95247641e+06, -2.94694681e+06, -2.94140786e+06,
-2.93585963e+06, -2.93030216e+06, -2.92473550e+06, -2.91915972e+06,
-2.91357487e+06, -2.90798100e+06, -2.90237817e+06, -2.89676643e+06,
-2.89114584e+06, -2.88551646e+06, -2.87987834e+06, -2.87423153e+06,
-2.86857610e+06, -2.86291209e+06, -2.85723957e+06, -2.85155858e+06,
-2.84586919e+06, -2.84017146e+06, -2.83446543e+06, -2.82875116e+06,
-2.82302872e+06, -2.81729815e+06, -2.81155952e+06, -2.80581287e+06,
-2.80005827e+06, -2.79429578e+06, -2.78852545e+06, -2.78274733e+06,
-2.77696149e+06, -2.77116798e+06, -2.76536686e+06, -2.75955819e+06,
-2.75374202e+06, -2.74791841e+06, -2.74208742e+06, -2.73624911e+06,
-2.73040352e+06, -2.72455073e+06, -2.71869079e+06, -2.71282376e+06,
-2.70694969e+06, -2.70106864e+06, -2.69518067e+06, -2.68928585e+06,
-2.68338422e+06, -2.67747584e+06, -2.67156078e+06, -2.66563909e+06,
-2.65971083e+06, -2.65377606e+06, -2.64783484e+06, -2.64188722e+06,
-2.63593327e+06, -2.62997304e+06, -2.62400659e+06, -2.61803399e+06,
-2.61205528e+06, -2.60607054e+06, -2.60007981e+06, -2.59408316e+06,
-2.58808065e+06, -2.58207233e+06, -2.57605827e+06, -2.57003852e+06,
-2.56401315e+06, -2.55798221e+06, -2.55194577e+06, -2.54590387e+06,
-2.53985659e+06, -2.53380398e+06, -2.52774610e+06, -2.52168301e+06,
-2.51561478e+06, -2.50954145e+06, -2.50346310e+06, -2.49737977e+06,
-2.49129154e+06, -2.48519846e+06, -2.47910059e+06, -2.47299799e+06,
-2.46689073e+06, -2.46077885e+06, -2.45466243e+06, -2.44854152e+06,
-2.44241619e+06, -2.43628648e+06, -2.43015247e+06, -2.42401422e+06,
-2.41787178e+06, -2.41172522e+06, -2.40557459e+06, -2.39941996e+06,
-2.39326139e+06, -2.38709894e+06, -2.38093266e+06, -2.37476263e+06,
-2.36858890e+06, -2.36241153e+06, -2.35623058e+06, -2.35004612e+06,
-2.34385820e+06, -2.33766689e+06, -2.33147225e+06, -2.32527433e+06,
-2.31907320e+06, -2.31286893e+06, -2.30666157e+06, -2.30045118e+06,
-2.29423782e+06, -2.28802157e+06, -2.28180246e+06, -2.27558058e+06,
-2.26935598e+06, -2.26312872e+06, -2.25689886e+06, -2.25066647e+06,
-2.24443160e+06, -2.23819432e+06, -2.23195469e+06, -2.22571277e+06,
-2.21946862e+06, -2.21322231e+06, -2.20697389e+06, -2.20072343e+06,
-2.19447099e+06, -2.18821663e+06, -2.18196041e+06, -2.17570239e+06,
-2.16944264e+06, -2.16318122e+06, -2.15691819e+06, -2.15065361e+06,
-2.14438754e+06, -2.13812005e+06, -2.13185120e+06, -2.12558104e+06,
-2.11930964e+06, -2.11303707e+06, -2.10676338e+06, -2.10048864e+06,
-2.09421290e+06, -2.08793624e+06, -2.08165870e+06, -2.07538037e+06,
-2.06910128e+06, -2.06282152e+06, -2.05654113e+06, -2.05026019e+06,
-2.04397875e+06, -2.03769688e+06, -2.03141463e+06, -2.02513208e+06,
-2.01884928e+06, -2.01256629e+06, -2.00628317e+06, -2.00000000e+06,
-1.99371683e+06, -1.98743371e+06, -1.98115072e+06, -1.97486792e+06,
-1.96858537e+06, -1.96230312e+06, -1.95602125e+06, -1.94973981e+06,
-1.94345887e+06, -1.93717848e+06, -1.93089872e+06, -1.92461963e+06,
-1.91834130e+06, -1.91206376e+06, -1.90578710e+06, -1.89951136e+06,
-1.89323662e+06, -1.88696293e+06, -1.88069036e+06, -1.87441896e+06,
-1.86814880e+06, -1.86187995e+06, -1.85561246e+06, -1.84934639e+06,
-1.84308181e+06, -1.83681878e+06, -1.83055736e+06, -1.82429761e+06,
-1.81803959e+06, -1.81178337e+06, -1.80552901e+06, -1.79927657e+06,
-1.79302611e+06, -1.78677769e+06, -1.78053138e+06, -1.77428723e+06,
-1.76804531e+06, -1.76180568e+06, -1.75556840e+06, -1.74933353e+06,
-1.74310114e+06, -1.73687128e+06, -1.73064402e+06, -1.72441942e+06,
-1.71819754e+06, -1.71197843e+06, -1.70576218e+06, -1.69954882e+06,
-1.69333843e+06, -1.68713107e+06, -1.68092680e+06, -1.67472567e+06,
-1.66852775e+06, -1.66233311e+06, -1.65614180e+06, -1.64995388e+06,
-1.64376942e+06, -1.63758847e+06, -1.63141110e+06, -1.62523737e+06,
-1.61906734e+06, -1.61290106e+06, -1.60673861e+06, -1.60058004e+06,
-1.59442541e+06, -1.58827478e+06, -1.58212822e+06, -1.57598578e+06,
-1.56984753e+06, -1.56371352e+06, -1.55758381e+06, -1.55145848e+06,
-1.54533757e+06, -1.53922115e+06, -1.53310927e+06, -1.52700201e+06,
-1.52089941e+06, -1.51480154e+06, -1.50870846e+06, -1.50262023e+06,
-1.49653690e+06, -1.49045855e+06, -1.48438522e+06, -1.47831699e+06,
-1.47225390e+06, -1.46619602e+06, -1.46014341e+06, -1.45409613e+06,
-1.44805423e+06, -1.44201779e+06, -1.43598685e+06, -1.42996148e+06,
-1.42394173e+06, -1.41792767e+06, -1.41191935e+06, -1.40591684e+06,
-1.39992019e+06, -1.39392946e+06, -1.38794472e+06, -1.38196601e+06,
-1.37599341e+06, -1.37002696e+06, -1.36406673e+06, -1.35811278e+06,
-1.35216516e+06, -1.34622394e+06, -1.34028917e+06, -1.33436091e+06,
-1.32843922e+06, -1.32252416e+06, -1.31661578e+06, -1.31071415e+06,
-1.30481933e+06, -1.29893136e+06, -1.29305031e+06, -1.28717624e+06,
-1.28130921e+06, -1.27544927e+06, -1.26959648e+06, -1.26375089e+06,
-1.25791258e+06, -1.25208159e+06, -1.24625798e+06, -1.24044181e+06,
-1.23463314e+06, -1.22883202e+06, -1.22303851e+06, -1.21725267e+06,
-1.21147455e+06, -1.20570422e+06, -1.19994173e+06, -1.19418713e+06,
-1.18844048e+06, -1.18270185e+06, -1.17697128e+06, -1.17124884e+06,
-1.16553457e+06, -1.15982854e+06, -1.15413081e+06, -1.14844142e+06,
-1.14276043e+06, -1.13708791e+06, -1.13142390e+06, -1.12576847e+06,
-1.12012166e+06, -1.11448354e+06, -1.10885416e+06, -1.10323357e+06,
-1.09762183e+06, -1.09201900e+06, -1.08642513e+06, -1.08084028e+06,
-1.07526450e+06, -1.06969784e+06, -1.06414037e+06, -1.05859214e+06,
-1.05305319e+06, -1.04752359e+06, -1.04200339e+06, -1.03649265e+06,
-1.03099142e+06, -1.02549975e+06, -1.02001770e+06, -1.01454532e+06,
-1.00908266e+06, -1.00362979e+06, -9.98186749e+05, -9.92753597e+05,
-9.87330385e+05, -9.81917168e+05, -9.76514000e+05, -9.71120932e+05,
-9.65738020e+05, -9.60365315e+05, -9.55002871e+05, -9.49650740e+05,
-9.44308976e+05, -9.38977631e+05, -9.33656759e+05, -9.28346410e+05,
-9.23046638e+05, -9.17757496e+05, -9.12479034e+05, -9.07211307e+05,
-9.01954364e+05, -8.96708259e+05, -8.91473043e+05, -8.86248767e+05,
-8.81035484e+05, -8.75833244e+05, -8.70642100e+05, -8.65462102e+05,
-8.60293301e+05, -8.55135749e+05, -8.49989496e+05, -8.44854593e+05,
-8.39731091e+05, -8.34619041e+05, -8.29518492e+05, -8.24429495e+05,
-8.19352101e+05, -8.14286360e+05, -8.09232321e+05, -8.04190034e+05,
-7.99159549e+05, -7.94140917e+05, -7.89134185e+05, -7.84139405e+05,
-7.79156624e+05, -7.74185893e+05, -7.69227260e+05, -7.64280774e+05,
-7.59346484e+05, -7.54424439e+05, -7.49514687e+05, -7.44617277e+05,
-7.39732258e+05, -7.34859676e+05, -7.29999581e+05, -7.25152021e+05,
-7.20317042e+05, -7.15494694e+05, -7.10685023e+05, -7.05888077e+05,
-7.01103903e+05, -6.96332549e+05, -6.91574062e+05, -6.86828488e+05,
-6.82095875e+05, -6.77376269e+05, -6.72669717e+05, -6.67976265e+05,
-6.63295960e+05, -6.58628847e+05, -6.53974973e+05, -6.49334384e+05,
-6.44707125e+05, -6.40093243e+05, -6.35492782e+05, -6.30905788e+05,
-6.26332307e+05, -6.21772383e+05, -6.17226062e+05, -6.12693388e+05,
-6.08174407e+05, -6.03669162e+05, -5.99177698e+05, -5.94700060e+05,
-5.90236292e+05, -5.85786438e+05, -5.81350541e+05, -5.76928646e+05,
-5.72520795e+05, -5.68127034e+05, -5.63747404e+05, -5.59381950e+05,
-5.55030714e+05, -5.50693740e+05, -5.46371069e+05, -5.42062745e+05,
-5.37768811e+05, -5.33489308e+05, -5.29224278e+05, -5.24973765e+05,
-5.20737810e+05, -5.16516455e+05, -5.12309740e+05, -5.08117709e+05,
-5.03940402e+05, -4.99777861e+05, -4.95630126e+05, -4.91497239e+05,
-4.87379239e+05, -4.83276169e+05, -4.79188069e+05, -4.75114978e+05,
-4.71056937e+05, -4.67013986e+05, -4.62986166e+05, -4.58973514e+05,
-4.54976073e+05, -4.50993880e+05, -4.47026975e+05, -4.43075397e+05,
-4.39139185e+05, -4.35218379e+05, -4.31313016e+05, -4.27423136e+05,
-4.23548776e+05, -4.19689975e+05, -4.15846772e+05, -4.12019203e+05,
-4.08207307e+05, -4.04411121e+05, -4.00630683e+05, -3.96866030e+05,
-3.93117200e+05, -3.89384229e+05, -3.85667154e+05, -3.81966011e+05,
-3.78280838e+05, -3.74611671e+05, -3.70958546e+05, -3.67321499e+05,
-3.63700565e+05, -3.60095781e+05, -3.56507183e+05, -3.52934805e+05,
-3.49378683e+05, -3.45838851e+05, -3.42315346e+05, -3.38808202e+05,
-3.35317452e+05, -3.31843133e+05, -3.28385277e+05, -3.24943920e+05,
-3.21519095e+05, -3.18110835e+05, -3.14719176e+05, -3.11344149e+05,
-3.07985789e+05, -3.04644128e+05, -3.01319199e+05, -2.98011036e+05,
-2.94719671e+05, -2.91445137e+05, -2.88187465e+05, -2.84946688e+05,
-2.81722837e+05, -2.78515946e+05, -2.75326045e+05, -2.72153166e+05,
-2.68997339e+05, -2.65858598e+05, -2.62736971e+05, -2.59632491e+05,
-2.56545187e+05, -2.53475090e+05, -2.50422231e+05, -2.47386640e+05,
-2.44368346e+05, -2.41367380e+05, -2.38383770e+05, -2.35417547e+05,
-2.32468740e+05, -2.29537377e+05, -2.26623489e+05, -2.23727102e+05,
-2.20848247e+05, -2.17986952e+05, -2.15143244e+05, -2.12317152e+05,
-2.09508703e+05, -2.06717926e+05, -2.03944848e+05, -2.01189497e+05,
-1.98451899e+05, -1.95732081e+05, -1.93030071e+05, -1.90345895e+05,
-1.87679580e+05, -1.85031151e+05, -1.82400635e+05, -1.79788059e+05,
-1.77193447e+05, -1.74616825e+05, -1.72058219e+05, -1.69517655e+05,
-1.66995156e+05, -1.64490749e+05, -1.62004457e+05, -1.59536305e+05,
-1.57086318e+05, -1.54654520e+05, -1.52240935e+05, -1.49845586e+05,
-1.47468498e+05, -1.45109693e+05, -1.42769196e+05, -1.40447028e+05,
-1.38143214e+05, -1.35857775e+05, -1.33590735e+05, -1.31342115e+05,
-1.29111938e+05, -1.26900227e+05, -1.24707001e+05, -1.22532285e+05,
-1.20376098e+05, -1.18238462e+05, -1.16119399e+05, -1.14018928e+05,
-1.11937072e+05, -1.09873850e+05, -1.07829282e+05, -1.05803390e+05,
-1.03796193e+05, -1.01807710e+05, -9.98379618e+04, -9.78869674e+04,
-9.59547461e+04, -9.40413170e+04, -9.21466989e+04, -9.02709105e+04,
-8.84139704e+04, -8.65758969e+04, -8.47567081e+04, -8.29564220e+04,
-8.11750563e+04, -7.94126286e+04, -7.76691564e+04, -7.59446568e+04,
-7.42391469e+04, -7.25526434e+04, -7.08851631e+04, -6.92367223e+04,
-6.76073374e+04, -6.59970245e+04, -6.44057993e+04, -6.28336777e+04,
-6.12806752e+04, -5.97468070e+04, -5.82320884e+04, -5.67365342e+04,
-5.52601592e+04, -5.38029780e+04, -5.23650050e+04, -5.09462544e+04,
-4.95467402e+04, -4.81664761e+04, -4.68054759e+04, -4.54637529e+04,
-4.41413203e+04, -4.28381913e+04, -4.15543788e+04, -4.02898952e+04,
-3.90447533e+04, -3.78189651e+04, -3.66125429e+04, -3.54254985e+04,
-3.42578437e+04, -3.31095900e+04, -3.19807487e+04, -3.08713309e+04,
-2.97813477e+04, -2.87108097e+04, -2.76597275e+04, -2.66281116e+04,
-2.56159720e+04, -2.46233188e+04, -2.36501618e+04, -2.26965105e+04,
-2.17623745e+04, -2.08477628e+04, -1.99526846e+04, -1.90771486e+04,
-1.82211636e+04, -1.73847379e+04, -1.65678798e+04, -1.57705974e+04,
-1.49928985e+04, -1.42347909e+04, -1.34962819e+04, -1.27773790e+04,
-1.20780891e+04, -1.13984192e+04, -1.07383760e+04, -1.00979660e+04,
-9.47719559e+03, -8.87607079e+03, -8.29459759e+03, -7.73278171e+03,
-7.19062871e+03, -6.66814393e+03, -6.16533253e+03, -5.68219948e+03,
-5.21874954e+03, -4.77498728e+03, -4.35091709e+03, -3.94654314e+03,
-3.56186944e+03, -3.19689978e+03, -2.85163776e+03, -2.52608679e+03,
-2.22025008e+03, -1.93413064e+03, -1.66773131e+03, -1.42105472e+03,
-1.19410329e+03, -9.86879269e+02, -7.99384699e+02, -6.31621433e+02,
-4.83591126e+02, -3.55295238e+02, -2.46735037e+02, -1.57911592e+02,
-8.88257821e+01, -3.94782877e+01, -9.86959628e+00])
v
array([[ 0.0001405 , -0.00028099, -0.00042148, ..., 0.00042148,
-0.00028099, -0.0001405 ],
[-0.00028099, 0.00056197, 0.00084293, ..., 0.00084293,
-0.00056197, -0.00028099],
[ 0.00042148, -0.00084293, -0.0012643 , ..., 0.0012643 ,
-0.00084293, -0.00042148],
...,
[ 0.00042148, 0.00084293, -0.0012643 , ..., 0.0012643 ,
0.00084293, -0.00042148],
[-0.00028099, -0.00056197, 0.00084293, ..., 0.00084293,
0.00056197, -0.00028099],
[ 0.0001405 , 0.00028099, -0.00042148, ..., 0.00042148,
0.00028099, -0.0001405 ]])
w[-1]
-9.869596283345277
v[-1]
array([ 0.0001405 , 0.00028099, -0.00042148, -0.00056197, 0.00070245,
0.00084293, -0.00098339, -0.00112385, 0.0012643 , 0.00140473,
-0.00154515, -0.00168556, 0.00182594, 0.00196631, -0.00210666,
-0.00224699, 0.0023873 , 0.00252759, -0.00266784, -0.00280808,
0.00294828, 0.00308846, -0.0032286 , -0.00336872, 0.0035088 ,
0.00364884, -0.00378885, -0.00392882, 0.00406876, 0.00420865,
-0.0043485 , -0.00448831, 0.00462808, 0.0047678 , -0.00490747,
-0.00504709, 0.00518666, 0.00532619, -0.00546566, -0.00560507,
0.00574443, 0.00588374, -0.00602298, -0.00616217, 0.00630129,
0.00644036, -0.00657936, -0.00671829, 0.00685716, 0.00699596,
-0.00713469, -0.00727336, 0.00741194, 0.00755046, -0.0076889 ,
-0.00782727, 0.00796556, 0.00810377, -0.0082419 , -0.00837995,
0.00851791, 0.0086558 , -0.00879359, -0.0089313 , 0.00906892,
0.00920646, -0.0093439 , -0.00948125, 0.0096185 , 0.00975566,
-0.00989273, -0.01002969, 0.01016656, 0.01030333, -0.01043999,
-0.01057656, 0.01071301, 0.01084937, -0.01098561, -0.01112175,
0.01125778, 0.01139369, -0.0115295 , -0.01166519, 0.01180076,
0.01193622, -0.01207156, -0.01220678, 0.01234188, 0.01247686,
-0.01261172, -0.01274645, 0.01288105, 0.01301553, -0.01314988,
-0.0132841 , 0.01341819, 0.01355215, -0.01368597, -0.01381966,
0.01395321, 0.01408663, -0.0142199 , -0.01435303, 0.01448603,
0.01461888, -0.01475158, -0.01488414, 0.01501656, 0.01514882,
-0.01528094, -0.0154129 , 0.01554471, 0.01567637, -0.01580788,
-0.01593922, 0.01607041, 0.01620145, -0.01633232, -0.01646303,
0.01659358, 0.01672396, -0.01685418, -0.01698424, 0.01711412,
0.01724384, -0.01737339, -0.01750276, 0.01763197, 0.01776099,
-0.01788985, -0.01801852, 0.01814702, 0.01827534, -0.01840348,
-0.01853144, 0.01865921, 0.0187868 , -0.01891421, -0.01904143,
0.01916846, 0.0192953 , -0.01942195, -0.01954841, 0.01967468,
0.01980075, -0.01992663, -0.02005231, 0.02017779, 0.02030307,
-0.02042816, -0.02055304, 0.02067771, 0.02080219, -0.02092646,
-0.02105052, 0.02117437, 0.02129802, -0.02142146, -0.02154468,
0.02166769, 0.02179049, -0.02191307, -0.02203544, 0.02215759,
0.02227952, -0.02240123, -0.02252271, 0.02264398, 0.02276502,
-0.02288584, -0.02300644, 0.0231268 , 0.02324694, -0.02336685,
-0.02348652, 0.02360597, 0.02372518, -0.02384416, -0.0239629 ,
0.02408141, 0.02419968, -0.02431771, -0.0244355 , 0.02455305,
0.02467035, -0.02478742, -0.02490423, 0.02502081, 0.02513713,
-0.02525321, -0.02536904, 0.02548462, 0.02559994, -0.02571502,
-0.02582984, 0.0259444 , 0.02605871, -0.02617276, -0.02628656,
0.02640009, 0.02651336, -0.02662637, -0.02673912, 0.02685161,
0.02696383, -0.02707578, -0.02718747, 0.02729889, 0.02741004,
-0.02752092, -0.02763152, 0.02774186, 0.02785192, -0.0279617 ,
-0.02807121, 0.02818044, 0.0282894 , -0.02839807, -0.02850647,
0.02861458, 0.02872241, -0.02882996, -0.02893722, 0.0290442 ,
0.02915089, -0.02925729, -0.02936341, 0.02946923, 0.02957477,
-0.02968001, -0.02978496, 0.02988961, 0.02999397, -0.03009803,
-0.0302018 , 0.03030527, 0.03040844, -0.03051131, -0.03061388,
0.03071614, 0.03081811, -0.03091977, -0.03102112, 0.03112217,
0.03122291, -0.03132334, -0.03142346, 0.03152327, 0.03162278,
-0.03172197, -0.03182084, 0.03191941, 0.03201765, -0.03211558,
-0.0322132 , 0.0323105 , 0.03240747, -0.03250413, -0.03260047,
0.03269648, 0.03279218, -0.03288754, -0.03298259, 0.03307731,
0.0331717 , -0.03326577, -0.0333595 , 0.03345291, 0.03354599,
-0.03363873, -0.03373115, 0.03382323, 0.03391498, -0.03400639,
-0.03409747, 0.03418821, 0.03427861, -0.03436867, -0.0344584 ,
0.03454779, 0.03463683, -0.03472553, -0.03481389, 0.03490191,
0.03498958, -0.03507691, -0.03516389, 0.03525052, 0.03533681,
-0.03542274, -0.03550833, 0.03559357, 0.03567845, -0.03576299,
-0.03584717, 0.03593099, 0.03601446, -0.03609758, -0.03618034,
0.03626274, 0.03634479, -0.03642647, -0.0365078 , 0.03658877,
0.03666937, -0.03674962, -0.0368295 , 0.03690901, 0.03698817,
-0.03706696, -0.03714538, 0.03722343, 0.03730112, -0.03737844,
-0.03745539, 0.03753197, 0.03760819, -0.03768402, -0.03775949,
0.03783459, 0.03790931, -0.03798366, -0.03805763, 0.03813123,
0.03820445, -0.03827729, -0.03834976, 0.03842185, 0.03849355,
-0.03856488, -0.03863583, 0.0387064 , 0.03877658, -0.03884638,
-0.0389158 , 0.03898483, 0.03905348, -0.03912175, -0.03918963,
0.03925712, 0.03932422, -0.03939094, -0.03945726, 0.0395232 ,
0.03958875, -0.0396539 , -0.03971867, 0.03978304, 0.03984702,
-0.03991061, -0.0399738 , 0.0400366 , 0.04009901, -0.04016101,
-0.04022263, 0.04028384, 0.04034466, -0.04040508, -0.0404651 ,
0.04052472, 0.04058394, -0.04064276, -0.04070118, 0.04075919,
0.04081681, -0.04087402, -0.04093083, 0.04098723, 0.04104323,
-0.04109883, -0.04115402, 0.0412088 , 0.04126318, -0.04131715,
-0.04137071, 0.04142386, 0.04147661, -0.04152894, -0.04158087,
0.04163238, 0.04168349, -0.04173418, -0.04178446, 0.04183433,
0.04188378, -0.04193283, -0.04198145, 0.04202967, 0.04207747,
-0.04212485, -0.04217182, 0.04221837, 0.04226451, -0.04231022,
-0.04235552, 0.04240041, 0.04244487, -0.04248891, -0.04253254,
0.04257575, 0.04261853, -0.0426609 , -0.04270284, 0.04274436,
0.04278546, -0.04282614, -0.0428664 , 0.04290623, 0.04294564,
-0.04298462, -0.04302319, 0.04306132, 0.04309903, -0.04313632,
-0.04317318, 0.04320961, 0.04324562, -0.0432812 , -0.04331636,
0.04335108, 0.04338538, -0.04341925, -0.04345269, 0.0434857 ,
0.04351829, -0.04355044, -0.04358217, 0.04361346, 0.04364432,
-0.04367476, -0.04370476, 0.04373433, 0.04376347, -0.04379218,
-0.04382045, 0.04384829, 0.0438757 , -0.04390268, -0.04392922,
0.04395533, 0.04398101, -0.04400625, -0.04403106, 0.04405543,
0.04407937, -0.04410287, -0.04412594, 0.04414857, 0.04417077,
-0.04419253, -0.04421385, 0.04423474, 0.04425519, -0.0442752 ,
-0.04429478, 0.04431392, 0.04433262, -0.04435089, -0.04436872,
0.04438611, 0.04440306, -0.04441957, -0.04443565, 0.04445129,
0.04446648, -0.04448124, -0.04449556, 0.04450944, 0.04452288,
-0.04453589, -0.04454845, 0.04456057, 0.04457226, -0.0445835 ,
-0.0445943 , 0.04460466, 0.04461459, -0.04462407, -0.04463311,
0.04464171, 0.04464987, -0.04465759, -0.04466487, 0.04467171,
0.04467811, -0.04468407, -0.04468958, 0.04469466, 0.04469929,
-0.04470348, -0.04470724, 0.04471055, 0.04471341, -0.04471584,
-0.04471783, 0.04471937, 0.04472048, -0.04472114, -0.04472136,
0.04472114, 0.04472048, -0.04471937, -0.04471783, 0.04471584,
0.04471341, -0.04471055, -0.04470724, 0.04470348, 0.04469929,
-0.04469466, -0.04468958, 0.04468407, 0.04467811, -0.04467171,
-0.04466487, 0.04465759, 0.04464987, -0.04464171, -0.04463311,
0.04462407, 0.04461459, -0.04460466, -0.0445943 , 0.0445835 ,
0.04457226, -0.04456057, -0.04454845, 0.04453589, 0.04452288,
-0.04450944, -0.04449556, 0.04448124, 0.04446648, -0.04445129,
-0.04443565, 0.04441957, 0.04440306, -0.04438611, -0.04436872,
0.04435089, 0.04433262, -0.04431392, -0.04429478, 0.0442752 ,
0.04425519, -0.04423474, -0.04421385, 0.04419253, 0.04417077,
-0.04414857, -0.04412594, 0.04410287, 0.04407937, -0.04405543,
-0.04403106, 0.04400625, 0.04398101, -0.04395533, -0.04392922,
0.04390268, 0.0438757 , -0.04384829, -0.04382045, 0.04379218,
0.04376347, -0.04373433, -0.04370476, 0.04367476, 0.04364432,
-0.04361346, -0.04358217, 0.04355044, 0.04351829, -0.0434857 ,
-0.04345269, 0.04341925, 0.04338538, -0.04335108, -0.04331636,
0.0432812 , 0.04324562, -0.04320961, -0.04317318, 0.04313632,
0.04309903, -0.04306132, -0.04302319, 0.04298462, 0.04294564,
-0.04290623, -0.0428664 , 0.04282614, 0.04278546, -0.04274436,
-0.04270284, 0.0426609 , 0.04261853, -0.04257575, -0.04253254,
0.04248891, 0.04244487, -0.04240041, -0.04235552, 0.04231022,
0.04226451, -0.04221837, -0.04217182, 0.04212485, 0.04207747,
-0.04202967, -0.04198145, 0.04193283, 0.04188378, -0.04183433,
-0.04178446, 0.04173418, 0.04168349, -0.04163238, -0.04158087,
0.04152894, 0.04147661, -0.04142386, -0.04137071, 0.04131715,
0.04126318, -0.0412088 , -0.04115402, 0.04109883, 0.04104323,
-0.04098723, -0.04093083, 0.04087402, 0.04081681, -0.04075919,
-0.04070118, 0.04064276, 0.04058394, -0.04052472, -0.0404651 ,
0.04040508, 0.04034466, -0.04028384, -0.04022263, 0.04016101,
0.04009901, -0.0400366 , -0.0399738 , 0.03991061, 0.03984702,
-0.03978304, -0.03971867, 0.0396539 , 0.03958875, -0.0395232 ,
-0.03945726, 0.03939094, 0.03932422, -0.03925712, -0.03918963,
0.03912175, 0.03905348, -0.03898483, -0.0389158 , 0.03884638,
0.03877658, -0.0387064 , -0.03863583, 0.03856488, 0.03849355,
-0.03842185, -0.03834976, 0.03827729, 0.03820445, -0.03813123,
-0.03805763, 0.03798366, 0.03790931, -0.03783459, -0.03775949,
0.03768402, 0.03760819, -0.03753197, -0.03745539, 0.03737844,
0.03730112, -0.03722343, -0.03714538, 0.03706696, 0.03698817,
-0.03690901, -0.0368295 , 0.03674962, 0.03666937, -0.03658877,
-0.0365078 , 0.03642647, 0.03634479, -0.03626274, -0.03618034,
0.03609758, 0.03601446, -0.03593099, -0.03584717, 0.03576299,
0.03567845, -0.03559357, -0.03550833, 0.03542274, 0.03533681,
-0.03525052, -0.03516389, 0.03507691, 0.03498958, -0.03490191,
-0.03481389, 0.03472553, 0.03463683, -0.03454779, -0.0344584 ,
0.03436867, 0.03427861, -0.03418821, -0.03409747, 0.03400639,
0.03391498, -0.03382323, -0.03373115, 0.03363873, 0.03354599,
-0.03345291, -0.0333595 , 0.03326577, 0.0331717 , -0.03307731,
-0.03298259, 0.03288754, 0.03279218, -0.03269648, -0.03260047,
0.03250413, 0.03240747, -0.0323105 , -0.0322132 , 0.03211558,
0.03201765, -0.03191941, -0.03182084, 0.03172197, 0.03162278,
-0.03152327, -0.03142346, 0.03132334, 0.03122291, -0.03112217,
-0.03102112, 0.03091977, 0.03081811, -0.03071614, -0.03061388,
0.03051131, 0.03040844, -0.03030527, -0.0302018 , 0.03009803,
0.02999397, -0.02988961, -0.02978496, 0.02968001, 0.02957477,
-0.02946923, -0.02936341, 0.02925729, 0.02915089, -0.0290442 ,
-0.02893722, 0.02882996, 0.02872241, -0.02861458, -0.02850647,
0.02839807, 0.0282894 , -0.02818044, -0.02807121, 0.0279617 ,
0.02785192, -0.02774186, -0.02763152, 0.02752092, 0.02741004,
-0.02729889, -0.02718747, 0.02707578, 0.02696383, -0.02685161,
-0.02673912, 0.02662637, 0.02651336, -0.02640009, -0.02628656,
0.02617276, 0.02605871, -0.0259444 , -0.02582984, 0.02571502,
0.02559994, -0.02548462, -0.02536904, 0.02525321, 0.02513713,
-0.02502081, -0.02490423, 0.02478742, 0.02467035, -0.02455305,
-0.0244355 , 0.02431771, 0.02419968, -0.02408141, -0.0239629 ,
0.02384416, 0.02372518, -0.02360597, -0.02348652, 0.02336685,
0.02324694, -0.0231268 , -0.02300644, 0.02288584, 0.02276502,
-0.02264398, -0.02252271, 0.02240123, 0.02227952, -0.02215759,
-0.02203544, 0.02191307, 0.02179049, -0.02166769, -0.02154468,
0.02142146, 0.02129802, -0.02117437, -0.02105052, 0.02092646,
0.02080219, -0.02067771, -0.02055304, 0.02042816, 0.02030307,
-0.02017779, -0.02005231, 0.01992663, 0.01980075, -0.01967468,
-0.01954841, 0.01942195, 0.0192953 , -0.01916846, -0.01904143,
0.01891421, 0.0187868 , -0.01865921, -0.01853144, 0.01840348,
0.01827534, -0.01814702, -0.01801852, 0.01788985, 0.01776099,
-0.01763197, -0.01750276, 0.01737339, 0.01724384, -0.01711412,
-0.01698424, 0.01685418, 0.01672396, -0.01659358, -0.01646303,
0.01633232, 0.01620145, -0.01607041, -0.01593922, 0.01580788,
0.01567637, -0.01554471, -0.0154129 , 0.01528094, 0.01514882,
-0.01501656, -0.01488414, 0.01475158, 0.01461888, -0.01448603,
-0.01435303, 0.0142199 , 0.01408663, -0.01395321, -0.01381966,
0.01368597, 0.01355215, -0.01341819, -0.0132841 , 0.01314988,
0.01301553, -0.01288105, -0.01274645, 0.01261172, 0.01247686,
-0.01234188, -0.01220678, 0.01207156, 0.01193622, -0.01180076,
-0.01166519, 0.0115295 , 0.01139369, -0.01125778, -0.01112175,
0.01098561, 0.01084937, -0.01071301, -0.01057656, 0.01043999,
0.01030333, -0.01016656, -0.01002969, 0.00989273, 0.00975566,
-0.0096185 , -0.00948125, 0.0093439 , 0.00920646, -0.00906892,
-0.0089313 , 0.00879359, 0.0086558 , -0.00851791, -0.00837995,
0.0082419 , 0.00810377, -0.00796556, -0.00782727, 0.0076889 ,
0.00755046, -0.00741194, -0.00727336, 0.00713469, 0.00699596,
-0.00685716, -0.00671829, 0.00657936, 0.00644036, -0.00630129,
-0.00616217, 0.00602298, 0.00588374, -0.00574443, -0.00560507,
0.00546566, 0.00532619, -0.00518666, -0.00504709, 0.00490747,
0.0047678 , -0.00462808, -0.00448831, 0.0043485 , 0.00420865,
-0.00406876, -0.00392882, 0.00378885, 0.00364884, -0.0035088 ,
-0.00336872, 0.0032286 , 0.00308846, -0.00294828, -0.00280808,
0.00266784, 0.00252759, -0.0023873 , -0.00224699, 0.00210666,
0.00196631, -0.00182594, -0.00168556, 0.00154515, 0.00140473,
-0.0012643 , -0.00112385, 0.00098339, 0.00084293, -0.00070245,
-0.00056197, 0.00042148, 0.00028099, -0.0001405 ])
import matplotlib.pyplot as plt
plt.plot(v[:,-1])
plt.plot(v[:,-2])
plt.plot(v[:,-3])
plt.plot(v[:,-4])
[<matplotlib.lines.Line2D at 0x7fc06d4167c0>]
w[-1]
-9.869596283345277
w[-2]
-39.478287725393045
w[-3]
-88.82578210003349