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
13
votes
1 answer

Plotting log-binned network degree distributions

I have often encountered and made long-tailed degree distributions/histograms from complex networks like the figures below. They make the heavy end of these tails, well, very heavy and crowded from many observations: However, many publications I…
Brian Keegan
  • 2,208
  • 4
  • 24
  • 31
13
votes
1 answer

multinomial pmf in python scipy/numpy

Is there a built-in function in scipy/numpy for getting the PMF of a Multinomial? I'm not sure if binom generalizes in the correct way, e.g. # Attempt to define multinomial with n = 10, p = [0.1, 0.1, 0.8] rv = scipy.stats.binom(10, [0.1, 0.1,…
user248237
12
votes
5 answers

How to deal with underflow in scientific computing?

I am working on probabilistic models, and when doing inference on those models, the estimated probabilities can become very small. In order to avoid underflow, I am currently working in the log domain (I store the log of the probabilities).…
Edouard
  • 1,463
  • 1
  • 11
  • 13
12
votes
3 answers

How can DVCS help scientific programming?

I'm doing some preliminary work in investigating how DVCS (the likes of Git, Hg, Bazar) can help in the process of scientific programming, especially for graduate students. I think I'm in quite a good position for this since I've been programming…
Tim Lin
  • 3,244
  • 2
  • 19
  • 17
12
votes
4 answers

Methods for entering equations while programming in C/C++ , Python or Fortran

I am writing a code which had long mathematical equations with many trigonometric and other identities. Is there a way of visualising the same expression in latex and making a C or python expression from it or the other way around. How do you enter…
GGrewal
  • 177
  • 1
  • 1
  • 6
12
votes
2 answers

Tracing Python warnings/errors to a line number in numpy and scipy

I am getting the error: Warning: invalid value encountered in log From Python and I believe the error is thrown by numpy (using version 1.5.0). However, since I am calling the "log" function in several places, I'm not sure where the error is…
user248237
12
votes
3 answers

Help with symplectic integrators

I'm trying to develop a physics simulation and I want to implement a fourth-order symplectic integration method. The problem is that I must be getting the math wrong, since my simulation is not working at all when using the symplectic integrator (as…
12
votes
12 answers

Modern language with the advantages of FORTRAN?

I've been working with a lot of FORTRAN 77 lately, and though I had reservations at first, I now see some great qualities of the language. It is: Simple to learn (no object-oriented or functional-programming complications) Easy to read Blazing…
JasonFruit
  • 7,764
  • 5
  • 46
  • 61
11
votes
5 answers

Solving nonlinear equations numerically

I need to solve nonlinear minimization (least residual squares of N unknowns) problems in my Java program. The usual way to solve these is the Levenberg-Marquardt algorithm. I have a couple of questions Does anybody have experience on the different…
11
votes
3 answers

Concatenate a large number of HDF5 files

I have about 500 HDF5 files each of about 1.5 GB. Each of the files has the same exact structure, which is 7 compound (int,double,double) datasets and variable number of samples. Now I want to concatenate all this files by concatenating each of the…
Andrea Zonca
  • 8,378
  • 9
  • 42
  • 70
11
votes
3 answers

Using scipy gaussian kernel density estimation to calculate CDF inverse

The gaussian_kde function in scipy.stats has a function evaluate that can returns the value of the PDF of an input point. I'm trying to use gaussian_kde to estimate the inverse CDF. The motivation is for generating Monte Carlo realizations of some…
aph
  • 1,765
  • 2
  • 19
  • 34
11
votes
7 answers

Scalable, fast, text file backed database engine?

I am dealing with large amounts of scientific data that are stored in tab separated .tsv files. The typical operations to be performed are reading several large files, filtering out only certain columns/rows, joining with other sources of data,…
Roman Zenka
  • 3,514
  • 3
  • 31
  • 36
11
votes
10 answers

Is C really used for a lot of Scientific Computing?

I'm currently taking a math class in College called "Scientific Computing" and the professor told us that C is the most common language used for, well, scientific computing and am just wondering as to how accurate this professor is?
Bobby
  • 18,217
  • 15
  • 74
  • 89
10
votes
1 answer

Is there a way to further improve sparse solution times using python?

I have been trying different sparse solvers available in Python 3 and comparing the performance between them and also against Octave and Matlab. I have chosen both direct and iterative approaches, I will explain this more in detail below. To…
uom0
  • 383
  • 2
  • 12
10
votes
3 answers

why PL/I didn't make it in scientific computing?

PL/I is a very old language but seemingly haven't got much publicity and appreciation as Fortran for scientific computing. Why is that? A search on the web does show that there are many PL/I codes for scientific computing. There is among others a…
yCalleecharan
  • 4,656
  • 11
  • 56
  • 86