Questions tagged as 'python-3.x'

0
answers

Distance between coordinates

I'm trying to calculate the distance between coordinates, the data to be compared comes from an sql query and a geojson. The query data are points that correspond to properties while the json data are vias. I need to take the first point a...
asked by 21.02.2018 / 12:41
0
answers

Problem with module in Nosetests, python

I'm trying to run my tests (done with python 3.5), meager nosetests, but doing it with the nosetests command I get the following E ====================================================================== ERROR: Failure: ImportError (No mo...
asked by 09.02.2018 / 18:29
1
answer

Error "only length-1 arrays can be converted to Python scalars" when using ndarray as a function

I have the following code in Python, I have problems in the penultimate line, I do not know if calling the method initial there is an error. Can you help me? import numpy as np from math import exp,ceil def initial (x): init=0.09...
asked by 01.02.2018 / 02:29
1
answer

As I extend the User model of django

I want to create something like a study blog, but I want to create a user that has more attributes than the default django auth_user, I read that this class can be extended and I saw an example more or less like this: from django.db import mod...
asked by 26.01.2018 / 05:53
1
answer

Doubt with Python exercise

I have doubts about how to get to do this python exercise:    Using the notes.csv file, make a program in python that reads the data from that file and builds the following structure: alumnos = [ {"nombre":"Daniel", "apellidos":"Fustero L...
asked by 28.01.2018 / 18:48
1
answer

How to convert an entry () to input ()?

Hi, I'm doing a program in tkinter that deals with a list to which you can add and remove what the user enters. For the user to add something, I need that when I press enter the information found in entry()" is saved and a code is execute...
asked by 25.01.2018 / 15:43
0
answers

Convert .ui to .py Generates Error [closed]

I have tried to generate a python script with PyQt5 but when trying to convert it I get an error: Now check the PATH to confirm that the environment variable is there, also try to change from version of python to version 3.3, 3.6 and it...
asked by 03.02.2018 / 18:48
0
answers

RuntimeWarning: invalid value encountered in multiply

I have the following program transcribed in Python from MATLAB import numpy as np from math import exp,ceil def initial (x): init=0.09*np.exp(-x**2/50) return init a = -20 b= 20 T=4 M=500 rhom=0.2 n=10 drho=rhom/n rho=np.linspace(0,rh...
asked by 04.02.2018 / 21:35
0
answers

How do you open an image or file that is in another folder? [closed]

I am learning Python in my first year of university and I want to work on a visual novel, but without using any graphic engine. I am using Tkinter in the Python version 3.6 and to be able to maintain a certain order in all the files that I wi...
asked by 14.01.2018 / 20:04
0
answers

ValueError: shape mismatch: objects can not be broadcast to a single shape because a variable is modified "alone"

I am a code and depending on what values I give to one of the variables, it works well or gives me the following error:    ValueError: shape mismatch: objects can not be broadcast to a single   shape I've been going over everything. I hav...
asked by 17.01.2018 / 14:26