Posts by Adam Basílio • 71 points
9 posts
-
-1
votes1
answer30
viewsQ: How to make classes with multi-level functions?
I’m developing a code for the following problem: I have a series of experiments to be done. For each experiment, I have to do different calculations (which I called beta, dynamic and static in the…
-
0
votes1
answer27
viewsA: How to put a limit to my vector?
I made the following change to the code: ZY = (rpico**2)/((1-rpico**2)**2 + (2*zeta*rpico)**2)**(1/2) zyl = [] for item in ZY: if item > 1.5 and item < 2: zyl.append(item) The idea is the same…
-
-1
votes2
answers47
viewsA: I need the highest and lowest note of the matrix, but when I print out a vector with the three notes what do I do? I’m using min and max
the min and max built-in python is not good for searching for minimums and maximums in multidimensional arrays. Use this package functions numpy and it’s gonna work. import numpy as np def…
pythonanswered Adam Basílio 71 -
0
votes1
answer54
viewsA: How to pass the value of Sg. Input to a variable in another part of the code?
He got a little snippy, but it worked. First: Forget SQL. For this code ai, it is an Overkill. But if you want to expand this application, SQL may be a good idea. Second: Make the following changes…
-
1
votes2
answers88
viewsA: how to correctly pass the txt file data to a python list?
The following code is working: lista1 = [1,2,2,3,4,5,6,6,6,6,7,8,9,10] keyword = 2 for index in range(0,len(lista1)): # print(index) if lista1[index] == keyword: print(f'Foi encontrada a…
-
1
votes1
answer26
viewsA: How to compare the elements of a list
I believe the code below can help you. Basically it iterates item by item in the list and identifies whether the item in a given position is equal to the previous one, since you said that your list…
pythonanswered Adam Basílio 71 -
0
votes1
answer40
viewsA: graphics generation automation with Seaborn is creating repeated colobars
Problem solved: The corrected code looked like this: import pandas as pd import numpy as np import seaborn as sns import matplotlib.pyplot as plt ''' ==================================== TESTS…
-
1
votes1
answer40
viewsQ: graphics generation automation with Seaborn is creating repeated colobars
I have the following problem: I have a database consisting of a 2D array of measures that vary over time. For each time measure, I need to generate a color map chart to be merged later into a gif or…
-
1
votes1
answer364
viewsQ: Attributeerror: str Object has no attribute 'num_points'
I am trying to create a data collector of an experiment I am doing. So far I have the following code: in an archive experiments.py has the class: import csv class Experimento: def __init__(self,…