py tag

191 questions


1 answers
102 views
0
I want to draw a straight line in three-dimensional space to find the intersection with the sphere.

I'd like to find and describe the expression of a straight line to find the intersection of a straight line and a sphere in 3D space from any two points. How should I program it?Straight lines in 2D c...


1 answers
70 views
0
I want to fit two functions at the same time with python.

I am using python 3.6.The following code is a two-dimensional graph of data_x and data1 and a two-dimensional graph of data_x and data2 are fitted with different functions.import matplotlib.pyplot as ...

1 years ago

1 answers
55 views
0
Please tell me how to break down the expression by using sympy with positive and negative.

1+2*x-3*cos(x)1st Second +2*xThird - 3*cos(x)Could not find standard function.Is it a regular expression method?Thank you for your cooperation.

1 years ago

1 answers
102 views
0
Coordinate designation of arrays in python

python 3.6 opencv3I don't know how to find one position (x,y) coordinate in numpy ndarray.The reason why I want to access the numpyndarray address is because I thought that the cv2.Keypoints() argumen...

1 years ago

1 answers
76 views
0
How to output each element of a NumPy array with a comma

For example, the output of the next array of (6, 6) is [[0.0000.3505-0.63850.6240-0.33820.011] [ 0.3505 1.2691 0.0000 0.0000 0.0000 0.3503] [-0.6385 0.0000 0.7116 0.0000 0.0000 0.6385] [ 0.6240 0.0000...

1 years ago

1 answers
67 views
0
How to Read Fortran Format Data in Python

Ask how to load data in python.The data to be read is in the format 10f8.3 in the format Fortran 80 column, as shown below.0.01000.01000.0240.027-0.0260.020-0.119-0.154 -0.015 -0.081 -0.045 -0.016 -0....


1 answers
76 views
0
I want to read the wav file in python.

I want to read the wav file in python.>>import specie>>> from scope importio>>>> from scipy.io import wavfile>>>sample_rate,X=scipy.io.wavfile.read(test.wav)ValueEr...

1 years ago

2 answers
144 views
0
I want Scipy to generate a random sparse matrix with a uniform distribution of nonzero elements from -1.0 to 1.0.

Scipy has a uniform distribution of nonzero elements from -1.0 to 1.0, and I want to generate a random sparse matrix.Simply use Scipy's landscipy.sparse.rand(m,n) because the element has a uniform dis...

1 years ago

2 answers
58 views
0
To convert three three-dimensional points into two-dimensional axes:

How do I perform coordinate transformation such that there are three 3D vectors A, B, and C, where AB is applied to the x-axis of the 2D space and AC is applied to the y-axis of the 2D space?As an ama...

1 years ago

1 answers
160 views
0
multiply multiple matrices simultaneously

Python I would like to multiply multiple matrices simultaneously with numpy or pytorch without using a for loop.For example, suppose you have five different matrices of 10x100 and one matrix of 100x10...

1 years ago
« - 5 - »

© 2024 OneMinuteCode. All rights reserved.