java 是否有适用于 Jython 的 NumPy 克隆?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/316410/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-29 11:55:07  来源:igfitidea点击:

Is there a good NumPy clone for Jython?

javapythonnumpyjython

提问by jbrogdon

I'm a relatively new convert to Python. I've written some code to grab/graph data from various sources to automate some weekly reports and forecasts. I've been intrigued by the Jython concept, and would like to port some Python code that I've written to Jython. In order to do this quickly, I need a NumPy clone for Jython (or Java). Is there anything like this out there?

我是一个相对较新的 Python 转换者。我编写了一些代码来从各种来源抓取/绘制数据,以自动生成一些每周报告和预测。我对 Jython 概念很感兴趣,并希望将我编写的一些 Python 代码移植到 Jython。为了快速完成此操作,我需要一个用于 Jython(或 Java)的 NumPy 克隆。有这样的东西吗?

采纳答案by babbageclunk

I can't find anything that's a clone of numpy, but there's a long list of Java numerics packages here- these should all be usable from Jython. Which one meets your requirements depends on what you're doing with numpy, I guess.

我找不到任何的numpy的一个克隆,但还有很长的Java的NUMERICS包列表在这里-这些都应该从Jython中是可用的。我猜,哪一个满足您的要求取决于您使用 numpy 做什么。

回答by Frank Hardisty

Wilberforce is essentially corrrect.

Wilberforce 基本上是正确的。

However, I suggest looking at the Apache Commons Math library-- that would be a better choice for a replacement Java numerics package than any of those listed in wilberforce's answer.

但是,我建议查看Apache Commons Math 库——与 wilberforce 的答案中列出的任何一个相比,这将是替代 Java 数字包的更好选择。

回答by Ahmed Fasih

Incanter, a Clojure scientific/statistical computing library, uses the Parallel Colt Java libraries with great success: http://incanter.org/. One route may be to start using the PColt classes in Jython, and slowly build up Python-esque bindings for it, as Incanter provides? (Let me know if you have interest in this.)

Incanter 是一个 Clojure 科学/统计计算库,它使用 Parallel Colt Java 库取得了巨大成功:http: //incanter.org/。一种方法可能是开始使用 Jython 中的 PColt 类,然后慢慢地为它构建 Python 式的绑定,如 Incanter 提供的那样?(如果您对此感兴趣,请告诉我。)

回答by rajsite

There is a build called JNumeric available on sourceforge:

sourceforge 上有一个名为 JNumeric 的版本:

The sourceforge version has not had a release in a long time, but it seems like an updated version for Jython 2.51 is also available (have not tried it myself):

sourceforge 版本好久没有发布了,不过貌似还有Jython 2.51的更新版本(自己没试过):

http://bitbucket.org/zornslemon/jnumeric-ra/downloads/

http://bitbucket.org/zornslemon/jnumeric-ra/downloads/