I am trying to make a graph with fixed ticks, regardless to the points values. For example, I want the ticks to be 0-6, and the points values
This is my first post at Stackoverflow, so thank you for the help. I am trying to replicate a code where I can match a list within a dataframe to another list,
I am writing a Vector and Matrix classes that use numpy in the backend in order to abstract some common methods and calculations (specifically, physics calculat
Is there a way to convert back and forth between a binary vector and a 128-bit number? I have the following binary vector: import numpy as np bits = np.array([
I want to generate a synthetic data from scratch which is a binary outcome sequence data (0/1). My data has following property- For the sake of an example, lets
I have a curve which is composed of 1200 values and i just want to compute its derivative so i use numpy gradient function. Here is the code i'm using: data = n
Goal: For a point a and a rectangle B, I would like to calculate the shortest distance between these two objects. Motivation Because this calculation is part of
I'm trying to generate augmented image data by pasting objects on different background. Problem is I've objects of different colors and background and the objec
I've a dataset of almost 3k colored images each of dim 1920x1080 and I want to store it in a numpy array so when calling shape on it in returns (3716,493,491,3)
I have a list of the coefficient to degree 1 polynomials, with a[i][0]*x^1 + a[i][1] a = np.array([[ 1. , 77.48514702], [ 1. , 0.
Scenario 1 My custom environment has the following _action_spec: self._action_spec = array_spec.BoundedArraySpec( shape=(highestIndex+1,), dtype=np.
I'm trying to fit 2 gaussians in my red/blue population data. But it does not fit. What am I doing wrong? The code is: mag1 = 'z' mag2 = 'y' mask_rich = (wazp_m
Currently I want to generate some samples to get expectation & variance of it. Given the probability density function: f(x) = {2x, 0 <= x <= 1; 0 othe
I have two images: A grayscale image, and a binary mask with the same dimensions. How do I color the image on the mask, while the rest of the image remains gray
I am getting optimization errors while creating map of h3 moments using a self-defined function get_h3 in python for an image file called "image_test". The idea
I am new to data structures and I would like to make my code faster (this is just part of a bigger code). Using dataframes while looking up variables is slowing
I am trying to calculate joint probabilities from two tensors.. It's a little bit confusing for me. Suppose we have : a = torch.Tensor((10, 2)) b = torch.Tensor
Tried to solve a simple problem from google.colab import files import numpy as np file = files.upload() !ls my_array = np.loadtxt('train_vector.csv', delimi
Hello, I am trying to detect objects from point cloud data using RANSAC and DBSCAN algorithms. I need to save these detected objects as separate files and then
This question relates to the optimal setup for a multiple-input multiple-output Keras (Tensorflow) model given corresponding numpy arrays. For example, suppose