Skip to main content

All Questions

Tagged with
-3 votes
0 answers
18 views

how can I compute the striking force of a football player using python [closed]

in a football match between England and Spain Julius Fueke needs a decisive goal, write a Python program that can compute the striking force of each of the players i tried using the import numpy but ...
yagi's user avatar
  • 1
0 votes
1 answer
17 views

How to avoid "UserWarning: Reading `.npy` or `.npz` file required additional header parsing..."

I'm creating .npz files in Python 2 (yes, Python 2, not 3 and I can't change it) full of .npy files. When reading those .npz files, I'm having the warning message: "UserWarning: Reading .npy or ....
Avatar36's user avatar
0 votes
2 answers
101 views

How can I store a function in an array in python?

I am trying to to store a function in an array and store that array in a dictionary so I can later call values from that array through the dictionary. I created a zeros array and created a loop that ...
user23622626's user avatar
1 vote
2 answers
77 views

Large number in python gives infinity

I dealing with data with very large numbers this error appears for example if I am trying to calculate for example: import random import numpy as np import cmath import math import mpmath from scipy....
learning statistics 's user avatar
0 votes
2 answers
94 views

Making a Diagonal matrix with desired shape

How to make a random elements digonal matrix in a numpy array with the desired shape, for example I want to make F to be a numpy array with shape (3, 2, 4, 4), and the diagonal matrix dimensions 4*4 ...
learning statistics 's user avatar
0 votes
3 answers
132 views

List comprehension instead of using append in for loop

I want to use list comprehension instead of using append method because it make the code runs faster however when it is a numpy array it doesn't work. import numpy as np a = np.array([1, 2 , 4]) b = ...
Math Explorer's user avatar
0 votes
2 answers
78 views

How to make a np.array of N diagonal matrices

I want to make an array of N diagonal matrices with M dimension, for example for N=2 and M=3, the array should be like this: np.array([[[1, 0, 0],[0, 2, 0],[0, 0, 3]], [[5, 0, 0],[0, 6, 0],[0, 0, 7]]])...
learning statistics 's user avatar
0 votes
1 answer
52 views

ImportError: cannot import name amount_to_text_sandv

Below is the traceback error. The error arises while installing the odoo9 requirements. Please help me to fix the error Traceback (most recent call last): File "/home/p7assest/physio_tatva/env/...
Tom Mike's user avatar
0 votes
1 answer
52 views

How to replace values in array b by indexes from array a ? [numpy]

For example, there is an array a. a = [ [1,2] ] And array b. b = [ [[0,0,0],[0,0,0]] ] How can I replace the values in array b with indexes from array a by 1 ? That is, the ...
Amand Seyfru's user avatar
0 votes
1 answer
34 views

Difference in Outputs when viewing an array in Python 2.7

Here I have 1 column of my MATLAB Data: raw_data 10 -2.77738418373534e+242 3.68340627929942e+23 -1.66594278761299e+94 NaN -2.77738418373534e+242 3.68340627929942e+23 -1.66594278761299e+94 NaN 2....
Abhishek Pandey's user avatar
-5 votes
2 answers
1k views

In Python in what ways can u make an empty NumPy array? [closed]

(https://i.sstatic.net/eakU9.jpg) To make an empty Numpy the array
Varaprasad Suddala's user avatar
0 votes
2 answers
37 views

How to set different values of the elements of a np.arrays to different values in Python 3.8?

Let I have the following np.array: >>>a=np.array([20, 10,5,10,5,10]) >>>array([20, 10, 5, 10, 5, 10]) Now, I want to replace 20 and 10 by 1 and 5 by 0. Is there a function that ...
shashank ranjan's user avatar
0 votes
1 answer
196 views

How to install numpy in pypy2.7-v7.3.9-win64 in windows?

I was trying to install numpy in pypy2.7-v7.3.9-win64 build. I am getting an error while I run pypy -m pip install numpy from command prompt. ERROR: Command errored out with exit status 1: command: '...
gopi.jtech's user avatar
1 vote
0 answers
27 views

I have to import a numpy file (npy) to a scrypt (.py 2.7), don't know how?

I have a numpy file that I can't share, that has to be imported in a python 2.7 (yes ... I need to work with 2.7 for this...) and I dont know how to do this, or how to know if it's recognized or how ...
user20503383's user avatar
0 votes
0 answers
39 views

(Python) just locate few corners of img (now I could locate all corner) that I want to know the setting the filter the output I want

(Python) just detect few corners instead of all from img, to optimize the speed My main purpose is to cut the original img in sticker size, and recognize img to text, find if is duplicate or print ...
user avatar

15 30 50 per page
1
2 3 4 5
189