Skip to main content

Questions tagged [numba]

Numba is an open source NumPy-aware optimizing compiler for Python.

2 votes
0 answers
66 views

GUI Tic-Tac-Toe game with six AI players - part 2: the styling

This question is part of a series of posts about my massive Tic Tac Toe game with AI players, the previous question is: GUI Tic-Tac-Toe game with six AI players - part 1: the UI. This question ...
Ξένη Γήινος's user avatar
0 votes
1 answer
207 views

Find the first value bigger than a threshold

This function takes two inputs: A is 2D (N,5) while B is 1D (N). It tries to find the smallest ...
Sanyou's user avatar
  • 13
5 votes
2 answers
460 views

Optimizing a node search method given a 2-D spatial point

I have a tree-like structure called grid. I have designed it as a structured numpy array. Each element of grid is a tree-node. ...
matts's user avatar
  • 53
1 vote
1 answer
136 views

Further optimizing the ISING model

I've implemented the 2D ISING model in Python, using NumPy and Numba's JIT: ...
Amirhossein Rezaei's user avatar
3 votes
2 answers
195 views

Intercolumn statistics between columns in a dataframe

I have a df and need to count how many adjacent columns have the same sign as other columns based on the sign of the first column, and multiply by the sign of the ...
jaried's user avatar
  • 177
2 votes
1 answer
736 views

Implementing histogram in python

I was trying to implement my own version of matplotlib's hist function and I came up with this: ...
Amirhossein Rezaei's user avatar
2 votes
1 answer
385 views

Monte Carlo using Numba

I'm having trouble with the slow computation of my Monte Carlo simulation code. Based on the pycallgraph, the bottleneck seems to be the module named ...
Ogiad's user avatar
  • 23
3 votes
1 answer
820 views

Using Numba works slower than not using it for my Python code

I thought this community is better place to ask my question so I ask here rather than at StackOverflow. Recently, I learned that Numba can make Python function ...
Senna's user avatar
  • 41
10 votes
1 answer
329 views

From Hummingbirds to Ornithopters: Simulating the Aerodynamics of Flapping Wings

Ptera Software A Flapping Wing Aerodynamics Simulator Written in Python Motivation About a year ago, I became fascinated by how animals fly. As an aerospace engineering student, it surprised me that ...
wingedNorthropi's user avatar
9 votes
5 answers
2k views

Fast Risk Battle Simulator

I have written some code in python to determine the outcome(including the remaining troops of both sides) of a Risk battle fought until one side is defeated. When using the Numba's njit decorator the ...
mcgowan_wmb's user avatar
2 votes
3 answers
275 views

Iterative uniform recombination of integer lists in python with numba

I have a list of N integers and I iteratively take two integers at random, which are not at the same position in the list and uniformly recombine their binary ...
HighwayJohn's user avatar
6 votes
3 answers
318 views

Random changes in a list of binary numbers

I have a list of N integers, e.g. intList=[1,7,3,1,5] with N=5 and all integers have a ...
HighwayJohn's user avatar
4 votes
2 answers
560 views

List of binary numbers: How many positions have a one and zero

I have a list of integers, e.g. i=[1,7,3,1,5] which I first transform to a list of the respective binary representations of length ...
HighwayJohn's user avatar
3 votes
0 answers
349 views

Improving Performance of Numba For-Loop and Matrix Multiplication for Time Integration Solver

I am writing some code that performs a simple time-history integration solver (Newmark method for structural dynamics) and I looking for some suggestions in how I can improve the performance of my ...
Ptrickono's user avatar
1 vote
0 answers
251 views

Numerical Double Integration using numba and scipy

Please see the following code. I am using it to calculate the double integration. Please help me to improve the code. ...
Shankar_Dutt's user avatar

15 30 50 per page