The value of np.arcsin that can be in the range of np.arange (0, 2, 0.05) is calculated. The domain of the inverse trigonometric function was set with arr = arr [arr<= 1].
I want to integrate two arrays with different lengths, np.arange (0, 2, 0.05) and arr = arr [arr<= 1] and make them correspond to text data. It cannot be implemented successfully.
Because i am a beginner, please let me know. Thank you.Tried
I ran np.savetxt to write text data, but it was not possible because the array length was different.
import numpy as np arr = np.arcsin ( np.arange (0, 2, 0.05) ) arr = arr [arr<= 1] np.savetxt ('test.txt', np.arange (0, 1.5, 0.05), arr)
Answer # 1
It can be connected with numpy.hstack, so save the result.
Why did you think that if you pass an array to np.savetxt, it will join you?
The program will writenevereven if written properly, so let's examine it first.
Google search: numpy array join
Also, when executed, the following warning appears.
RuntimeWarning: invalid value encountered in arcsin np.arange (0, 2, 0.05)
You are out of the domain of arcsin. Because the range of sin (x) is [-1, 1].
- python - i'm in trouble because i don't understand atocoder171f
- i'm in trouble because i don't know the meaning or answer of the english python quiz please tell me
- [python] i am in trouble because the calculation result of the scipy special function is nan
- i want to sort multiple arrays at the same time in python
- php - i'm in trouble because i get a laravel 500 server error
- python 3x - please let me know because there is a part of the code that i do not understand in the if statement
- python - comparing arrays of repeated statements
- java - i am in trouble because i can not change the contents of list
- problems with double arrays in python
- python - error that the total size of arrays does not match
- please tell me about python arrays
- [concatenation of arrays in python? ] i want to play "doremi fasoraside"
- i'm having trouble getting an error when using bind with python tkinter
- c# - [unity] with photon, i am in trouble because the matching process cannot be performed at the start of the second and subseq
- c# - [unity] in phton, i am in trouble because i get an error and cannot get out of the room
- i'm having trouble with a python syntax error
- html - i'm in trouble because i don't know how to customize the sns share button
- python - i'm having trouble handling the reverse for'index' with arguments'(0,)' not found error in django
- c# - [photon] i'm having trouble because i don't know how to use ismine
- [python] output error because the file format is not recognized when creating a graphviz file
- python - how can i make the tic-tac-toe that i made easier?
- i'm trying to create a scientific calculator with jupyter's python, but i want to add exponentiation, factorial, function, log,
- python - i want to use the stack to reverse the strings, but an error occurs, so please give me a solution
- python - i tried to make a multiplication table with the while function, but an error occurs, so please tell me the correction p
- python - how to remove a list from a tuple and store only the value
- python - cannot output the created sound data
- python - common behavior for everything in django
- python - i want to split one array into two without duplication
- about the problem that float subtraction does not work in numerical calculation in python
- python - something went wrong in the jupiter lab