conflicts resolved in temporary files

This commit is contained in:
SebastianoF
2020-01-19 22:06:39 +00:00
5 changed files with 4185 additions and 251 deletions

View File

@@ -651,12 +651,15 @@ print(D)
How to convert a float (32 bits) array into an integer (32 bits) in place?
< h53
hint: astype(copy=False)
hint: view and [:] =
< a53
Z = np.arange(10, dtype=np.float32)
Z = Z.astype(np.int32, copy=False)
print(Z)
# Thanks Vikas (https://stackoverflow.com/a/10622758/5989906)
# & unutbu (https://stackoverflow.com/a/4396247/5989906)
Z = (np.random.rand(10)*100).astype(np.float32)
Y = Z.view(np.int32)
Y[:] = Z
print(Y)
< q54
How to read the following file? (★★☆)