Questions tagged as 'python'

0
answers

Python InvalidArgumentError: You must feed to value for placeholder tensor 'and' with dtype float and shape [?, 10]

Hello I'm using a CNN network for street view house numbers SVHN data. When I try to run my code below to generate a summary that can be read by the Tensorboard through graphics, the following error appears:    InvalidArgumentError: You mu...
asked by 21.05.2018 / 13:31
1
answer

Referencing local coordinate system in python

I'm developing a 3D structural calculation software and I need to reference the local coordinate system of the bars. We define that the x-axis will always coincide with the central axis of the bar, the z-axis will be perpendicular to the global...
asked by 19.05.2018 / 15:18
0
answers

Function integration returns error "only length-1 arrays can be converted to Python scalars"

I'm trying to integrate a function into a given range that shows the flow of particles in a zero-angle (theta) direction as a function of the energy E of the particles. I've tried several ways and got different errors but this is what always per...
asked by 17.05.2018 / 02:38
1
answer

Python Advocation game

I have with the following problem: at every attempt of the user, the code does not accuse if it is cold, hot, warm, boiling. That is, do not give the tips to the player. If anyone can help me, I thank you! print('Você tem 10 chances de acertar...
asked by 17.05.2018 / 03:54
0
answers

Multiple search engines in a html file with variable parameters

Good morning everyone. Need to search for the name of the presidents of Brazil, in html files. I created a json with the names of the presidents to facilitate. Follow the code: # !/bin/env python # coding: utf-8 __author__ = '@britodfb...
asked by 26.06.2018 / 16:42
1
answer

multiplication algorithm per soma

I'm doing a job that I need to create an algorithm that turns product into sum or difference and I can only use the + , - , and else , if , print and% with%. I was able to do multiplication of positive numbers, but...
asked by 10.05.2018 / 19:58
1
answer

Numpy Array Error With dtype = numpy.uint8

The code below works normally, however the elements are "objects". M = numpy.array([[1,2,3],[1,2],[1,2,3,4]],dtype=object) However, when I run the code below, I get the message "setting an array element with a sequence". The question is: ho...
asked by 10.05.2018 / 15:29
1
answer

Problem installing Numpy [closed]

Good morning guys, I was trying to install Numpy on this machine ... I ran the "conda install numpy" command and it worked fine ... but when I ran "pip install numpy", it returns that error.     
asked by 24.05.2018 / 15:48
0
answers

IndexError: index 3 is out of bounds for axis 0 with size 2

D[i][j+1] = - u_med[i+1]/(delta_r[i]*delta_r[i+1])       IndexError: index 3 is out of bounds for axis 0 with size 2 I already had another problem with this code and I asked here , but the problem now is this. I'm working with the one-d...
asked by 08.05.2018 / 06:39
1
answer

Returning more than one Django data list

I made a homepage using django, I'm loading my slides and menus dynamically and it was perfect. I put both the menu and the footer through include and it worked 100%. Now I came across a problem, the product menu loaded on the main page when...
asked by 11.06.2018 / 04:40