Category "python"

Input 0 of layer "conv1d_5" is incompatible with the layer: expected min_ndim=3, found ndim=1. Full shape received: (None,) when predicting new values

I have trained a VAE and now I am trying to predict new data using this dataset. I have taken the predict code line from this tutorial. However, when I run the

How to do a Kfold cross validation by taking the samples into account

I have a numeric matrix to classify (45 rows, 102 columns), the first column represents the classes (0 and 1), the second represents the samples, the other colu

Regarding Merging classes in Image Segmentation (Python)

I'm Trying to implement Domain adaptation of Segmentation of Satellite Images From one set of images to another images. To align the classes in two domains , I

Extract indices of certain values from a list in python

Suppose, I have a list [0.5,1,1.5,2,2.5,3,3.5,4,4.5], now I would like to extract the indices of a list [1.5,2.5,3.5,4.5], which is a subset of that list.

RankWarning: Polyfit may be poorly conditioned

I am trying to find the rolling price slope of btc trading data (minute data) using pandas. When I run the script, the following error / warning pops up sys:1:

Object Detection Google Colab: AttributeError: module 'tensorflow' has no attribute 'contrib'

I've been working on codes for Object Detection in Google Colab as in 1 and in 2 but, when using the following code sample: !git clone --quiet https://github.co

How to check if all lowercase 'g' in a string has another 'g' adjacent to it?

I need to write a program that returns True/False based on the following conditions: A lowercase 'g' in a string is "happy" if there is another 'g' adjacent to

How do I parse the data on the website when scraping the web when the attribute I want is in the sub data?

I'm doing scrapping on a website and want to retrieve data on the 'stats' attribute then 'interest_count' data. But I don't know how to retrieve these attribute

Network errors with Python Telegram Bot

I use a Python Telegram Bot script in Visual Studio Code on my PC, and sometimes i have this error: telegram.ext.dispatcher - ERROR - No error handlers are regi

Python Win32 hide subtotals of pivot table

I've got the following code: def pivot_table(wb: object, ws1: object, pt_ws: object, ws_name: str, pt_name: str, pt_rows: list, pt_filters: list, pt_fields: lis

How can we use a python string variable in a SPARQL query?

I want to use python string variables in my SPARQL query without an IRI (for the sake of looping through a list of variables etc. I tried the code below but it

NPM Error "Can't find Python executable" in MacOS Big Sur

I've been looking for the answer to this for a good solid week now, with no success. I've looked at every StackOverflow post, every article from Google and ever

RankWarning: Polyfit may be poorly conditioned

I am trying to find the rolling price slope of btc trading data (minute data) using pandas. When I run the script, the following error / warning pops up sys:1:

Update django model objects from editable dash data-table

I want to update my models by an editable plotly dash-table (populated by a dataframe, himself populated by sqlconnection with models) in Django but I don't kno

ArcPro Python Package Manager not installing packages

I am working with ESRI ArcPro 2.9 and would like to install some additional python packages through the Python Package Manager. I've created a clone and made su

Python Win32 hide subtotals of pivot table

I've got the following code: def pivot_table(wb: object, ws1: object, pt_ws: object, ws_name: str, pt_name: str, pt_rows: list, pt_filters: list, pt_fields: lis

Beam to BigQuery silently failing to create BigQuery table

I am building a data pipeline from PubSub to Beam (Direct/Dataflow Runner) to Big Query. Today we started to run into issues where beam IO BigQuery connector st

ImportError: No module named absl.flags

I am trying to build from source using the command bazel run tensorboard -- --logdir path/to/logs as shown in the README but I keep getting the following error:

AWS Glue 3.0 PySpark: different behavior when installing dependencies using wheels vs installing same dependencies with Glue itself

Having a problem launching PySpark job that utilizes connection to RedShift via awswrangler lib. Everything works fine if using --additional-python-modules: aws

String Into Integer while sorting

Curious if there is a way to convert a string into an integer, only during the sort_values() process, or if it's easier to convert the variable to an integer pr