Skip to content

Commit

Permalink
Adjusted readme
Browse files Browse the repository at this point in the history
  • Loading branch information
david-zwicker committed Nov 11, 2022
1 parent 3322f53 commit a9b400c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
15 changes: 12 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,20 @@

Mathematica package to convert [MATHEMATICA](https://www.wolfram.com/mathematica/) expressions to Python [Numpy](http://www.numpy.org/)

## Quick usage

The quickest way to use the package is to directly load it from the master branch of this
repository by running the following code in a Mathematica notebook:

```Mathematica
Import["https://raw.githubusercontent.com/zwicker-group/MathematicaToPython/master/ToPython.wl"]
```

## Installation

To install the package
To install the package permanently, do the following

1. Download it
1. Download it from this repository
2. Click on `Mathematica`' `File menu-> Install->From file...`
3. Select the file on your disk

Expand All @@ -28,7 +37,7 @@ Beside the actual expression the `ToPython` function also supports two options:
* `Copy`, which when enabled copies the formatted expression to the clipboard

Taken together, a simple example call is
```
```Mathematica
ToPython[Sin[x], NumpyPrefix->"numpy", Copy->True]
```
which should copy `numpy.sin(x)` to your clipboard.
Expand Down
2 changes: 1 addition & 1 deletion ToPython.wl
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ PythonForm[E] = np<>"e";
(* Greek characters *)
greekrule={
"\[Alpha]"->"alpha","\[Beta]"->"beta","\[Gamma]"->"gamma","\[Delta]"->"delta",
"\[CurlyEpsilon]"->"curlyepsilon","\[Zeta]"->"zeta","\[Eta]"->"eta",
"\[Epsilon]"->"epsilon", "\[CurlyEpsilon]"->"curlyepsilon","\[Zeta]"->"zeta","\[Eta]"->"eta",
"\[Theta]"->"theta","\[Iota]"->"iota","\[Kappa]"->"kappa","\[Lambda]"->"lambda",
"\[Mu]"->"mu","\[Nu]"->"nu","\[Xi]"->"xi","\[Omicron]"->"omicron","\[Pi]"->"pi",
"\[Rho]"->"rho","\[FinalSigma]"->"finalsigma","\[Sigma]"->"sigma","\[Tau]"->"tau",
Expand Down

0 comments on commit a9b400c

Please sign in to comment.