Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
orekit_jpype
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Orekit
orekit_jpype
Commits
9d065e54
Commit
9d065e54
authored
1 year ago
by
Petrus Hyvönen
Browse files
Options
Downloads
Patches
Plain Diff
Make numpy non-mandatory
parent
12b7fbd6
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
orekit_jpype/orekit_converters.py
+16
-11
16 additions, 11 deletions
orekit_jpype/orekit_converters.py
pyproject.toml
+1
-2
1 addition, 2 deletions
pyproject.toml
with
17 additions
and
13 deletions
orekit_jpype/orekit_converters.py
+
16
−
11
View file @
9d065e54
...
...
@@ -5,7 +5,7 @@ It is assumed that the JVM is running.
Importing this file will automatically implement the changes.
"""
import
numpy
as
np
import
datetime
,
math
import
orekit_jpype
...
...
@@ -60,21 +60,26 @@ class _JAbsoluteDate(object):
int
(
math
.
floor
(
seconds
)),
int
(
1000000.0
*
(
seconds
-
math
.
floor
(
seconds
))))
try
:
import
numpy
as
np
@JImplementationFor
(
"
double[][]
"
)
class
_JDouble2DArray
(
object
):
@JImplementationFor
(
"
double[][]
"
)
class
_JDouble2DArray
(
object
):
def
to_numpy
(
self
)
->
np
.
ndarray
:
"""
Get the Java Double 2D Array as a Python numpy array
def
to_numpy
(
self
)
->
np
.
ndarray
:
"""
Get the Java Double 2D Array as a Python numpy array
Returns: the Double Array as numpy 2D array
Returns: the Double Array as numpy 2D array
"""
return
np
.
array
(
self
)
"""
return
np
.
array
(
self
)
def
__repr__
(
self
):
return
f
"
<
{
self
.
getClass
().
getSimpleName
()
}
:
{
np
.
array
(
self
).
__str__
()
}
>
"
def
__repr__
(
self
)
:
return
f
"
<
{
self
.
getClass
().
getSimpleName
()
}
:
{
np
.
array
(
self
).
__str__
()
}
>
"
except
ImportError
:
pass
# @JImplementationFor("double[]")
# class _JDoubleArray(object):
...
...
This diff is collapsed.
Click to expand it.
pyproject.toml
+
1
−
2
View file @
9d065e54
...
...
@@ -25,8 +25,7 @@ classifiers = [
]
dependencies
=
[
'jpype1'
,
'numpy'
'Jpype1'
]
[project.urls]
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment