File tree 4 files changed +32
-5
lines changed
src/main/java/org/matheclipse/core/sympy2symja
4 files changed +32
-5
lines changed Original file line number Diff line number Diff line change 1
1
Very experimental prototype for transpiling [ SymPy math expressions (Python)] ( https://github.com/sympy/sympy ) into [ Symja math expressions (Java)] ( https://github.com/axkr/symja_android_library ) .
2
+
3
+ With the following Maven command you can run the ** SymPy2Symja console** from the command line
4
+
5
+ ```
6
+ mvn exec:java@sympy2symja
7
+ ```
8
+
9
+ <img src =" https://raw.githubusercontent.com/axkr/sympy2symja/master/sympy2symja.png " width =" 100% " ></img >
Original file line number Diff line number Diff line change 48
48
</properties >
49
49
<dependencies >
50
50
<dependency >
51
- <groupId >org.matheclipse</groupId >
51
+ <groupId >org.matheclipse</groupId >
52
52
<artifactId >matheclipse-core</artifactId >
53
53
<version >3.1.0-SNAPSHOT</version >
54
54
</dependency >
76
76
<version >4.7.1</version >
77
77
</dependency >
78
78
</dependencies >
79
+ <build >
80
+ <pluginManagement >
81
+ <plugins >
82
+ <plugin >
83
+ <groupId >org.codehaus.mojo</groupId >
84
+ <artifactId >exec-maven-plugin</artifactId >
85
+ <version >3.2.0</version >
86
+ <executions >
87
+ <execution >
88
+ <id >sympy2symja</id >
89
+ <goals >
90
+ <goal >java</goal >
91
+ </goals >
92
+ <configuration >
93
+ <mainClass >
94
+ org.matheclipse.core.sympy2symja.SympyToSymjaExpr</mainClass >
95
+ </configuration >
96
+ </execution >
97
+ </executions >
98
+ </plugin >
99
+ </plugins >
100
+ </pluginManagement >
101
+ </build >
79
102
</project >
Original file line number Diff line number Diff line change 1
1
package org .matheclipse .core .sympy2symja ;
2
2
3
3
import java .io .BufferedReader ;
4
- import java .io .File ;
5
4
import java .io .IOException ;
6
5
import java .io .InputStreamReader ;
7
6
import java .nio .charset .StandardCharsets ;
@@ -47,9 +46,6 @@ public static void main(String[] args) throws Exception {
47
46
System .out .println (
48
47
"Create a Symja Java string from the SymPy expression input" );
49
48
F .initSymbols ();
50
- String userHome = System .getProperty ("user.home" );
51
- File sourceLocation =
52
- new File (userHome + "/git/symja_android_library/symja_android_library/doc/functions" );
53
49
String inputExpression ;
54
50
String trimmedInput ;
55
51
while (true ) {
You can’t perform that action at this time.
0 commit comments