Created
April 1, 2018 02:51
-
-
Save anurlybayev/46812eb25a51e334b01e93fb8893d4b3 to your computer and use it in GitHub Desktop.
numpy in Swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Python | |
let np = Python.import("numpy") | |
let x = np.array([6, 7, 8]) | |
let y = np.arange(24).reshape(2, 3, 4) | |
let a = np.ones(3, dtype: np.int32) | |
let b = np.linspace(0, pi, 3) | |
let c = a+b | |
let d = np.exp(c) | |
print(d) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment