Questions tagged [scientific-computing]

Use this tag for questions about using computers in science. Many of these questions also fit on scicomp.stackexchange.com.

Scientific computing encompasses numerical methods, physical simulations, data processing and visualization, and the many other ways in which computers are used to do scientific research.

There is an entire Stack Exchange site devoted to questions about scientific applications of computers. These sorts of questions may get more specialized attention at that site.

756 questions
142
votes
6 answers

binning data in python with scipy/numpy

is there a more efficient way to take an average of an array in prespecified bins? for example, i have an array of numbers and an array corresponding to bin start and end positions in that array, and I want to just take the mean in those bins? I…
user248237
136
votes
11 answers

What can MATLAB do that R cannot do?

I often hear people complain how expensive MATLAB licenses are. Then I wonder why they don't just use Octave or R. But is the latter right? Can you use R to replace MATLAB?
Frank
  • 64,140
  • 93
  • 237
  • 324
104
votes
6 answers

Interactive large plot with ~20 million sample points and gigabytes of data

I have got a problem (with my RAM) here: it's not able to hold the data I want to plot. I do have sufficient HD space. Is there any solution to avoid that "shadowing" of my data-set? Concretely I deal with Digital Signal Processing and I have to use…
wishi
  • 7,188
  • 17
  • 64
  • 103
92
votes
20 answers

Practices for programming in a scientific environment?

Background Last year, I did an internship in a physics research group at a university. In this group, we mostly used LabVIEW to write programs for controlling our setups, doing data acquisition and analyzing our data. For the first two purposes,…
onnodb
  • 5,241
  • 1
  • 32
  • 41
76
votes
5 answers

True or false output based on a probability

Is there a standard function for Python which outputs True or False probabilistically based on the input of a random number from 0 to 1? example of what I mean: def decision(probability): ...code goes here... return ...True or False... the…
Mike Vella
  • 10,187
  • 14
  • 59
  • 86
73
votes
10 answers

F# performance in scientific computing

I am curious as to how F# performance compares to C++ performance? I asked a similar question with regards to Java, and the impression I got was that Java is not suitable for heavy numbercrunching. I have read that F# is supposed to be more…
Anycorn
  • 50,217
  • 42
  • 167
  • 261
68
votes
2 answers

Principal components analysis using pandas dataframe

How can I calculate Principal Components Analysis from data in a pandas dataframe?
65
votes
7 answers

Plotting with C#

C# seems to show some promise for scientific computing, but I found very little about one plotting 2D graphs, which is very important both for science student and scientists. Is there a reliable, free, way to create publication quality 2D plot with…
Shinka
63
votes
6 answers

Is the order of a Python dictionary guaranteed over iterations?

I'm currently implementing a complex microbial food-web in Python using SciPy.integrate.ode. I need the ability to easily add species and reactions to the system, so I have to code up something quite general. My scheme looks something like…
Chinmay Kanchi
  • 62,729
  • 22
  • 87
  • 114
50
votes
4 answers

multithreaded blas in python/numpy

I am trying to implement a large number of matrix-matrix multiplications in Python. Initially, I assumed that NumPy would use automatically my threaded BLAS libraries since I built it against those libraries. However, when I look at top or something…
Lucas
  • 918
  • 1
  • 9
  • 18
49
votes
17 answers

The reading list for scientific programmer

I am working to become a scientific programmer. I have enough background in Math and Stat but rather lacking on programming background. I found it very hard to learn how to use a language for scientific programming because most of the reference for…
leon
  • 4,931
  • 7
  • 39
  • 37
40
votes
4 answers

How to test scientific software?

I'm convinced that software testing indeed is very important, especially in science. However, over the last 6 years, I never have come across any scientific software project which was under regular tests (and most of them were not even version…
FFox
  • 1,550
  • 2
  • 17
  • 26
39
votes
4 answers

Numerically stable softmax

Is there a numerically stable way to compute softmax function below? I am getting values that becomes Nans in Neural network code. np.exp(x)/np.sum(np.exp(y))
Abhishek Bhatia
  • 9,404
  • 26
  • 87
  • 142
37
votes
10 answers

Open source alternative to MATLAB's fmincon function?

Is there an open-source alternative to MATLAB's fmincon function for constrained linear optimization? I'm rewriting a MATLAB program to use Python / NumPy / SciPy and this is the only function I haven't found an equivalent to. A NumPy-based solution…
dF.
  • 74,139
  • 30
  • 130
  • 136
31
votes
4 answers

sigmoidal regression with scipy, numpy, python, etc

I have two variables (x and y) that have a somewhat sigmoidal relationship with each other, and I need to find some sort of prediction equation that will enable me to predict the value of y, given any value of x. My prediction equation needs to…
MedicalMath
  • 311
  • 1
  • 3
  • 4
1
2 3
50 51