#### Category : arrays

I have an array x_train with the following shape (3800, 10): [[ 8.58786106 2.05531597 47.69544082 … 22.18313066 58.95737578 16.74565073] [ 9.12246609 2.22890568 54.10625074 … 26.04059537 56.0996469 18.67649081] [ 8.69304657 1.68278122 49.72647589 … 27.39661295 55.67941362 21.72374764] … [ 7.38825607 1.9323082 42.25193966 … 26.32971473 76.62631333 23.39134685] [ 9.36668968 2.21513939 51.51743298 … 15.17773412 48.62399762 18.85870167] [ 6.85041714 1.48223543 ..

Problem I have a 2D array that contains a series of 0’s and 1’s which represent values that have been bit-packed. I need to insert an arbitrary number of 0’s at arbitrary points in every row in order to pad the bit-packed values a multiple of 8 bits. I have 3 vectors. A vector containing ..

Usage I am using the replit browser IDE for this project. Also, I am using replit’s database for this project. Problem So as you can see, in the code below, I am asking the user to log in, if not, Sign up, while saving the user’s data of money, deposits, inventory in a key-value pair ..

What would be a numpy function that goes through array a and then appends the endswidth to the end of each string in the a array. Code: a = np.array(["BTC", "ETH", "AUD", "DOGE"]) endswidth = "USD" Expected output: [BTCUSD, ETHUSD, AUDUSD, DOGE] Source: Python-3x..

What would be a numpy function that goes through array a and then output the indexes where values of array b is allocated. Code: a = np.array(["BTCUSD", "ETHUSDC", "BBB", "ETHUSD", "cow", "head"]) b= np.array(["BTCUSD", "ETHUSD"]) Expected output: Indexes: 0, 3 Source: Python-3x..

Suppose you have an array of points that have a chance to be flipped symmetrically (shown below) from matplotlib import pyplot as plt import numpy as np # Data a = np.array([0.1,-0.325,-0.55,0.775,1]) # x-axis b = np.array([10,-3.077,-1.818,1.2903,1]) # y-axis c = np.array([-0.1,0.325,0.55,-0.775,-1]) # x-axis d = np.array([-10,3.077,1.818,-1.2903,-1])# y-axis y = [a,b,c,d] # The array is ..