Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Numpy doesn't work in Spyder 4.1.3
Post: Numpy doesn't work in Spyder 4.1.3

Hello everyone. I have just istalled Spyder 4.1.3 as defined here using conda install spyder=4.1.3 However, I hace tried to run a code in which numpy has been imported as import numpy as np and the ou...
player1681 Data Science 1 2,131 May-31-2020, 11:43 AM
    Thread: could not convert string to float
Post: RE: could not convert string to float

(May-22-2020, 09:41 AM)ibreeden Wrote: As the message says: data is not a float. And also as the message shows: data is a lot of floats. That is the problem. You have to convert the text lines one b...
player1681 General Coding Help 4 5,834 May-22-2020, 09:56 AM
    Thread: could not convert string to float
Post: could not convert string to float

After reading a text file, as a column, I want to convert it from string to float; however, an error appears: with open('posx_mean_no_acoplo_tf_multiple.txt', 'r') as f2: data = f2.read() print(...
player1681 General Coding Help 4 5,834 May-22-2020, 09:32 AM
    Thread: Problem reading data from file
Post: RE: Problem reading data from file

(May-22-2020, 08:17 AM)ibreeden Wrote: You must not show the (address of) the function, but execute the function by adding (). print(mediaXoriginal.read()) EDIT: I have found the syntax error. Your ...
player1681 General Coding Help 2 3,732 May-22-2020, 08:57 AM
    Thread: Problem reading data from file
Post: Problem reading data from file

I am trying to read a simple colum vector as mediaXoriginal = open('posx_mean_no_acoplo_tf_multiple.txt', 'r') and then print(mediaXoriginal.read)However, the resulting output is Output:<built...
player1681 General Coding Help 2 3,732 May-22-2020, 08:14 AM
    Thread: scipy interp2d doesn't work
Post: RE: scipy interp2d doesn't work

(Feb-05-2020, 01:06 AM)scidam Wrote: Loops are slow in Python, so I need to clarify, does it hang when you call interp2d, or it hangs when you fill your arrays positionX and positionY? (Feb-05-2020...
player1681 Data Science 4 4,463 Feb-05-2020, 09:50 AM
    Thread: scipy interp2d doesn't work
Post: RE: scipy interp2d doesn't work

(Feb-04-2020, 08:43 AM)player1681 Wrote: Hello everybody. I have a .txt file in which a grid of X and Y points and values of f(X, Y) in said grid are constructed as columns. I am trying to program t...
player1681 Data Science 4 4,463 Feb-05-2020, 08:23 AM
    Thread: scipy interp2d doesn't work
Post: scipy interp2d doesn't work

Hello everybody. I have a .txt file in which a grid of X and Y points and values of f(X, Y) in said grid are constructed as columns. I am trying to program the Shannon Interpolation. For that I need t...
player1681 Data Science 4 4,463 Feb-04-2020, 08:43 AM
    Thread: Can I interpolate if I don't know the function I am dealing with?
Post: RE: Can I interpolate if I don't know the function...

Yes, I think this might be useful. Thank you very much.
player1681 Data Science 2 1,714 Jan-30-2020, 02:41 PM
    Thread: Can I interpolate if I don't know the function I am dealing with?
Post: Can I interpolate if I don't know the function I a...

Hello everyone. I am working on the translation of some code from mathematica to python. In one line it is written ifuncEPSX = Interpolation[windXMat //. {x_List} :> x]; here x_List is a matrix of ...
player1681 Data Science 2 1,714 Jan-30-2020, 01:15 PM
    Thread: Error using min() function on a list
Post: RE: Error using min() function on a list

(Jan-29-2020, 04:18 PM)ThiefOfTime Wrote: Well the thing is that you probably want to do the max and min over a list of number right? what you are building there are list of strings. For the max fun...
player1681 General Coding Help 2 1,703 Jan-29-2020, 04:23 PM
    Thread: Error using min() function on a list
Post: Error using min() function on a list

Hello everybody. I am trying to find the max and min values of the first two columns of a matrix. I have written the following code f = open('XdataTXT.txt','r') linesX=f.readlines() X_column_number ...
player1681 General Coding Help 2 1,703 Jan-29-2020, 04:08 PM
    Thread: Finding out roots of Chebyshev's polynomials
Post: RE: Finding out roots of Chebyshev's polynomials

I have figured out how to do this. My new code is as follows: for n in range(10): nprint(chop(taylor(lambda x: chebyt(n, x), 0, n))) print(np.roots(chop(taylor(lambda x: chebyt(n, x), 0, n))[...
player1681 Data Science 2 2,433 Dec-02-2019, 01:56 PM
    Thread: Finding out roots of Chebyshev's polynomials
Post: Finding out roots of Chebyshev's polynomials

Hello everyone. I am constructing Chebyshev polinomials as specified here. I have replicated the fisrt part of the code succesfully as: import numpy as np import sympy as sp import mpmath as mp fr...
player1681 Data Science 2 2,433 Dec-02-2019, 11:48 AM
    Thread: Can I evaluate a Chebyshev polynomial using a function
Post: Can I evaluate a Chebyshev polynomial using a func...

Hello everyone. I need to evaluate an arbitrary Chebyshev polynomial of order n at a point x. I have done it manually using their definition as mt.cos(n*mt.acos(x))However, I am not satisfied by the...
player1681 Data Science 1 1,986 Nov-21-2019, 08:19 AM

User Panel Messages

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