We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 110758e commit 008074fCopy full SHA for 008074f
docs/src/juliacall.md
@@ -46,7 +46,21 @@ In this example:
46
If you are writing a package which uses Julia, then to avoid polluting the global `Main`
47
namespace you instead should start with:
48
```python
49
-import juliacall; jl = juliacall.newmodule("SomeName");
+import juliacall
50
+jl = juliacall.newmodule("SomeName")
51
+```
52
+
53
+Julia modules have a special method `seval` which will evaluate a given piece of code given
54
+as a string in the module. This is most frequently used to import modules:
55
+```python
56
+from array import array
57
+jl.seval("using Statistics")
58
+x = array('i', [1, 2, 3])
59
+jl.mean(x)
60
+# 2.0
61
+y = array('i', [2,4,8])
62
+jl.cor(x, y)
63
+# 0.9819805060619657
64
```
65
66
What to read next:
0 commit comments