All Questions
6 questions
1
vote
2
answers
774
views
Calculating the midpoint for numerical integration
I am trying to write some code to do numerical integration using the midpoint method. A and b are the bounds of integration. I keep getting only one value in my midpoint list. I want python to look ...
0
votes
0
answers
146
views
How to read binary data repeatedly into the same array?
What is the right way to repeatedly read fixed amounts of binary from a file into a pre-allocated Python array, so that each read overwrites the previous one, and the array's size remains constant?
...
2
votes
0
answers
363
views
How to return a two dimensional array from C++ function to Python using boost python numeric array?
I am learning Boost Python interface especially on exposing the C++ function to Python. Now I have a problem on how to return a two dimensional array of C++ function to python side. For example, we ...
1
vote
1
answer
741
views
numpy unique strange behaviour
according to the official numpy.unique documentation (http://docs.scipy.org/doc/numpy/reference/generated/numpy.unique.html) return_index=True should allow me to recover the first occurrences of ...
4
votes
2
answers
3k
views
Numpy Array Slicing
I have a 1D numpy array, and some offset/length values. I would like to extract from this array all entries which fall within offset, offset+length, which are then used to build up a new 'reduced' ...
3
votes
3
answers
2k
views
Element-wise median and percentiles of arrays with Numeric Python
I am using Numeric Python. Unfortunately, NumPy is not an option. If I have multiple arrays, such as:
a=Numeric.array(([1,2,3],[4,5,6],[7,8,9]))
b=Numeric.array(([9,8,7],[6,5,4],[3,2,1]))
c=Numeric....