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
I am gonna try to frame this in an understandable way but please let me know if further clarification is necessary. I am trying to create a list of hexagonal co
I have nrrd files of the brain tumor. When reading the file into an array with a header and passing the code print(filename), I get an array of zeros. I checked
I've tried to run a code example (hosted on keras.io) regarding the handwriting recognition task. While playing with the code, I faced a TensorFlow-related issu
I wish to calculate the natural logarithm of a value that is very close to 1, but not exactly one. For example, np.log(1 + 1e-22) is 0 and not some non-zero val
I want to bring in a text file through PyQt5 and draw a graph with data values. import sys from PyQt5.QtWidgets import QApplication, QMainWindow, QTextEdit, QAc
I want to train a model with self-generated matrices (word vectors). My data have the following datatypes: print(type(X)) print(type(X[0])) print(type(X[0][0]))