Questions tagged as 'python'

1
answer

See all values in an array

I would like to know how I can see all the values in an array when I do print. Give me this: ber_MFSK = M/2*qfunc(np.sqrt(k*ebno_theory)) print(ber_MFSK) And give me this: [ 1.58655254e-01 1.30927297e-01 1.04028637e-01 ...,...
asked by 09.10.2017 / 21:00
1
answer

What are other pass applications?

In the documentation the statement pass is defined    pass is a null operation. When executed, nothing happens. It is useful as a placeholder when syntactically a statement is required, but no code needs to be executed....
asked by 19.10.2017 / 23:47
1
answer

Calibration of stereo camera through the chessboard in openCV

I'm trying to calibrate a stereo camera using openCV, but the findChessboardCorners function is always returning False, I believe it's due to the high distortion of the image. Any suggestions for preprocessing to make the function accurate? C...
asked by 06.11.2018 / 18:22
2
answers

Decode HTML entities in a string in Python

I'm using Python 3 to access a web API. The response of the requests comes in the JSON pattern and my problem is that one of the strings is encoded with HTML entities (specifically accent). For example: "orientação-a-o...
asked by 02.12.2014 / 19:59
1
answer

process in python

I'm trying to change an external variable within a process but it is not working. I created a simple test class: from multiprocessing import Process class Classe(): def __init__(self, parent=None): self.variavel="antes" self.p = Proc...
asked by 22.06.2016 / 16:46
1
answer

What is the use of the .isidentifier () method in Python?

I came across the string .isidentifier() method and also the .isprintable() . Why use them? On what occasions would I use this?
asked by 13.08.2018 / 23:39
2
answers

How do I convert an RGB image to grayscale in Python?

I need to convert a number of RGB (color-coded%) images to grayscale.     
asked by 20.11.2015 / 22:44
1
answer

Why does Python override the value of False and True?

I'm studying Python and in these studies I ended up with something curious. > False = True #Imprime: True > print(False) #Imprime: True > False = bool(0) > print(False) #Imprime: False That is, I was able to rewrite the...
asked by 03.09.2015 / 22:17
3
answers

Method inside NLTK in python that returns a syntax tree

I'm using the NLTK Forest library and I saw there some parse (parse tree) sentences already created. However, I would like a method that from a new sentence it creates the parse in Portuguese. Examples: I use it today floresta.parsed_sents(...
asked by 29.11.2015 / 13:55
3
answers

How to use a value from a dictionary to call a specific function in Python?

I'm trying to use a dictionary to identify each function to a value, and call them through the program. My code is below (example): #!/usr/bin/env python menuOpt = { 1 : "valor", } #Main if __name__ == "__main__": print "Valor" men...
asked by 28.11.2015 / 00:41