Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Animate graph nodes inside a function
Post: Animate graph nodes inside a function

I have written the following code in Jupyter notebook to animate the colours of the graph nodes. %matplotlib notebook import networkx as nx import matplotlib.pyplot as plt import numpy as np import ...
adamG General Coding Help 0 2,955 Sep-23-2019, 11:18 AM
    Thread: Multiprocessing help
Post: Multiprocessing help

Hello, I have found the following lines of code to compute the array mx by the repeated calling of the function fun. from tqdm import tqdm from multiprocessing import Pool from functools import par...
adamG General Coding Help 0 1,599 Jul-24-2019, 12:14 PM
    Thread: how to code this for GPU?
Post: how to code this for GPU?

Hello, I am a complete beginner in GPU programming. I have the following piece of code that I have been running in parallel on CPUs. import cupy import ot.gpu with Pool(processes = workers) as p...
adamG General Coding Help 1 1,587 May-24-2019, 12:13 PM
    Thread: Broadcasting error in CVXPY
Post: Broadcasting error in CVXPY

Hello, I am trying to run the following code, which I took exactly from a website, where people confirmed it to be working. Could you please help with resolving this? import numpy as np import matp...
adamG Data Science 1 3,206 May-14-2019, 07:38 AM
    Thread: List of colors
Post: List of colors

I am trying to create to create a list of colors based on the labels contained in the array comms. import matplotlib.pyplot as plt cmap = plt.get_cmap("tab10") ind = [10 if np.remainder(comms[i],10)...
adamG Data Science 1 2,137 Apr-08-2019, 04:55 PM
    Thread: *** NameError: name '' is not defined
Post: *** NameError: name '' is not defined

I want to compare the first column of an array with all the other columns and then break the function if they are all the same. Outside the function, this code works. import numpy as np comms = np.a...
adamG General Coding Help 1 3,282 Apr-08-2019, 12:45 PM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020