You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The other solvers will be translated from the Fortran reference implementation in the future.
26
+
If you are interested in doing so, contact [Zaikun Zhang](https://www.zhangzk.net).
27
+
28
+
## Development notes
29
+
1
30
To develop, `cd` into the `src` directory and run
2
31
3
32
```pip install --editable .```
4
33
5
34
This will install prima locally in an editable fashion. From there you can run the examples/cobyla/cobyla_example.py (from any directory) and go from there.
6
35
7
-
## Style notes
36
+
###Style notes
8
37
9
38
- Most of the comments are copied from Fortran verbatim, except in cases where they need to modified due to specifics of the Python language. In these cases a note will be made of the difference between Fortran and Python
10
39
- Rationale:
@@ -13,7 +42,7 @@ This will install prima locally in an editable fashion. From there you can run t
13
42
- Rationale:
14
43
- Fortran uses `SIZE` so this helps us to be as consistent with the Fortran code as possible.
15
44
16
-
## A note on Fortran's `maxval`, `maximum`, and `maxval` and their Python equivalents
45
+
###A note on Fortran's `maxval`, `maximum`, and `maxval` and their Python equivalents
17
46
18
47
| Fortran | Python | Return value |
19
48
|-----------|--------------|--------------|
@@ -31,7 +60,7 @@ returns an elementwise maximum of the scalar and each element of the array.
31
60
This note applies to `minval`, `minimum`, and `min` as well.
32
61
33
62
34
-
## A note on indices
63
+
###A note on indices
35
64
36
65
Consider the following Fortran code
37
66
@@ -63,4 +92,4 @@ for i in range(1, 6):
63
92
print(some_array[i-1])
64
93
```
65
94
66
-
This leads to awkward Python code, since the more pythonic code would range from 0 to 5, and the indexing would be `some_array[i]`. In order to make the Python code more usable, we will attempt to write more "pythonic" code, even though that makes the translation a little bit more difficult.
95
+
This leads to awkward Python code, since the more pythonic code would range from 0 to 5, and the indexing would be `some_array[i]`. In order to make the Python code more usable, we will attempt to write more "pythonic" code, even though that makes the translation a little bit more difficult.
0 commit comments