Tag: python

54 votes
11 answers
1.5K views
Is there a library function for Root mean square error (RMSE) in python?

I know I could implement a root mean squared error function like this: def rmse(predictions, targets): re

avatar
Carmelina
0 1 0 9
asked 07 September, 2021
62 votes
15 answers
1.6K views
Installing SciPy with pip

It is possible to install NumPy with pip using pip install numpy. Is there a similar possibility with SciPy?

avatar
Jeff
0 1 0 9
asked 07 September, 2021
54 votes
17 answers
3.1K views
Calculating Pearson correlation and significance in Python

I am looking for a function that takes as input two lists, and returns the Pearson correlation, and the signif

avatar
Percy
0 1 0 9
asked 07 September, 2021
56 votes
28 answers
1.7K views
Moving average or running mean

Is there a SciPy function or NumPy function or module for Python that calculates the running mean of a 1D arra

avatar
Yolando
0 1 0 9
asked 07 September, 2021
62 votes
10 answers
2.7K views
How to smooth a curve in the right way?

Lets assume we have a dataset which might be given approximately by import numpy as np x = np.linspace(0,2*np

avatar
Bryan
0 1 0 9
asked 07 September, 2021
58 votes
9 answers
475 views
Does Conda replace the need for virtualenv?

I recently discovered Conda after I was having trouble installing SciPy, specifically on a Heroku app that I a

avatar
Percy
0 1 0 9
asked 07 September, 2021
47 votes
29 answers
1.7K views
Import Error: No module named numpy

I have a very similar question to this question, but still one step behind. I have only one version of Python

avatar
Fabian
0 1 0 9
asked 07 September, 2021
60 votes
8 answers
1.2K views
Relationship between SciPy and NumPy

SciPy appears to provide most (but not all [1]) of NumPy's functions in its own namespace. In other words

avatar
Tuan
0 1 0 9
asked 07 September, 2021
59 votes
12 answers
2.3K views
Read .mat files in Python

Is it possible to read binary MATLAB .mat files in Python? I've seen that SciPy has alleged support for

avatar
Majorie
0 1 0 9
asked 07 September, 2021
65 votes
5 answers
1.9K views
Can I detect if my code is running on cPython or Jython?

I'm working on a small django project that will be deployed in a servlet container later. But development

avatar
Denese
0 1 0 9
asked 07 September, 2021
57 votes
2 answers
2.5K views
Jython, use only a method from Python from Java?

When reading and using this article it assumes that we have a full object definition with class and mapping (p

avatar
Robt
0 1 0 9
asked 07 September, 2021
53 votes
1 answers
762 views
Clojure Jython interop

I was wondering if anyone has tried somehow calling Jython functions from within Clojure, and how you went abo

avatar
Chelsea
0 1 0 9
asked 07 September, 2021
49 votes
5 answers
2.8K views
fast-ish python/jython IPC?

All I want to do is make some RPC calls over sockets. I have a server that does backendish stuff running jytho

avatar
Nereida
0 1 0 9
asked 07 September, 2021
47 votes
2 answers
2.4K views
Jythonc missing

I just installed Jython 2.5.1. I want to convert my Python file into Java class file and it is instructed on t

avatar
Jeff
0 1 0 9
asked 07 September, 2021
59 votes
2 answers
1.2K views
Redux: How do I get Jython to use Python modules stored in Lib within its own jar file when running in Hadoop?

I'm attempting to use Jython for an implementation within Hadoop 1.2.1. I have seen strikingly little ab

avatar
Xavier
0 1 0 9
asked 07 September, 2021
52 votes
2 answers
2.2K views
Why does this Jython loop fail after a single run?

I've got the following code: public static String getVersion() { PythonInterpreter interpreter = ne

avatar
Clarice
0 1 0 9
asked 07 September, 2021
49 votes
4 answers
2.2K views
Differences between Jython and Python

I know Jython converts Python code into Java byte code, but are there any syntax changes between the two? and

avatar
Tuan
0 1 0 9
asked 07 September, 2021
57 votes
4 answers
1.2K views
jython multithreading

I started studying python a couple of month ago, then I found Jython. Do threads work properly in Jython, sin

avatar
Royal
0 1 0 9
asked 07 September, 2021
62 votes
6 answers
1.1K views
What are some strategies to write python code that works in CPython, Jython and IronPython

Having tries to target two of these environments at the same time I can safely say the if you have to use a da

avatar
Hildegard
0 1 0 9
asked 07 September, 2021
62 votes
3 answers
2.1K views
How to read the last MB of a very large text file

I am trying to find a string near the end of a text file. The problem is that the text file can vary greatly i

avatar
Charis
0 1 0 9
asked 07 September, 2021