Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import numpy as np
- a = np.arange(1000000).reshape(1000,1000)
- print(a**2)
- [[ 0 1 4 ..., 994009 996004 998001]
- [ 1000000 1002001 1004004 ..., 3988009 3992004 3996001]
- [ 4000000 4004001 4008004 ..., 8982009 8988004 8994001]
- ...,
- [1871554624 1873548625 1875542628 ..., -434400663 -432404668 -430408671]
- [-428412672 -426416671 -424420668 ..., 1562593337 1564591332 1566589329]
- [1568587328 1570585329 1572583332 ..., -733379959 -731379964 -729379967]]
- In [1]: np.arange(1000000).dtype
- Out[1]: dtype('int32')
- a=np.arange(1000000,dtype='int64').reshape(1000,1000)
- import numpy
- a=numpy.arange(1000,dtype=object)
- a**20
- {{{
- _mapper = [(nx.bool_, str2bool, False),
- (nx.integer, int, -1),
- (nx.floating, float, nx.nan),
- (complex, _bytes_to_complex, nx.nan + 0j),
- (nx.string_, bytes, asbytes('???'))]
- }}}
- {{{
- _mapper = [(nx.bool_, str2bool, False),
- (nx.int64, int, -1),
- (nx.floating, float, nx.nan),
- (complex, _bytes_to_complex, nx.nan + 0j),
- (nx.string_, bytes, asbytes('???'))]
- }}}
Add Comment
Please, Sign In to add comment