py tag

191 questions


1 answers
111 views
0
I want to learn whether the x,y coordinates entered into the neural network are located above or below the sin curve.

I was writing a code to learn whether the x,y coordinates entered into the neural network in python 3 are located above or below the sin curve, but an error occurred and I couldn't move forward and hi...


1 answers
52 views
0
I want to create a new array by randomly extracting rows from the list [overlapping]

(Two answers) Last yearI have a matrix list of 100x3 as shown below.There are two things you would like to do with this matrix:·I would like to randomly extract two lines at any number of times (e...

2 years ago

3 answers
56 views
0
Understanding Any Number of Nests Loop Processing in Python

I would like to create the following functions, but I would like to know how to loop any number of times.1. As an argument, take two functions: (1) an arbitrary number of dimensions of numpy array, an...

2 years ago

2 answers
75 views
0
HIGH ACCURACY CALCULATING METHOD FOR INVERSE MATRIX OF python

We are currently calculating the inverse matrix required for simulation in python.The data is stored in variable A of type ndarray,dtype=np.float64, where A is approximately 400x400 matrix.We found th...

2 years ago

1 answers
59 views
0
About the correlation coefficient of numpy

Hello, I have a question about python's numpy.When calculating the correlation coefficient, you can calculate it using numpy.corrcoef, but to verify the formula, cov/(numpy.std(X)*numpy.cov(X)*numpy.n...

2 years ago

2 answers
54 views
0
high-speed calculation of vectors and matrices

Please tell me how to do the following calculations at high speed.import numpy as np# It's actually about 100,000 long.a = np.array([1, 2, 3], [4, 5, 6]])# It's about 100,000 feet long.b=np.array([[1,...

2 years ago

1 answers
52 views
0
I want to delete rows in a two-dimensional array in Python under any conditions.

I would like to remove the line containing Yokohama from the 2D array below.arr=[ ['AA', 'BB', 'CC',] ['Lemon', '30', 'Tokyo',] ['Lemon', '20', 'Osaka'], ['Lemon', '10', 'Yokohama',] [Peach, 15, Tokyo...

2 years ago

1 answers
59 views
0
importerror numpy.core.multiarray failed to import

environmentmacos 10.9.5python 2.7.5Numpy 1.11.0gunicorn 19.3.0 What's troubling youI use virtualenv to run python code, but every time I update python code, it becomes importer error numpy.core.multia...

2 years ago

1 answers
80 views
0
matrix product for each element of a multidimensional array in MATLAB

I would like to achieve matrix product operations for each of the following elements in MATLAB that Python numpy.einsum can achieve.import numpy as npa=np.array([[1,2],[3,4]],[[1,3],[-3,1]]]])b=np.arr...

2 years ago

1 answers
55 views
0
Cannot see behavior of unique() method of numpy

I am having trouble knowing the behavior of the unique() method of numpy at all.import numpy as nplist_with_dupes=[1, 5, 6, 2, 5, 6, 8, 3, 3, 3, 7, 9]# (array([1, 2, 3, 5, 6, 7, 8, 9]) Returns an inde...

2 years ago
« - 9 - »

© 2024 OneMinuteCode. All rights reserved.