Feeds:
Posts
Comments

Archive for the ‘Python’ Category

Cython

Cython is a compiler which compiles Python-like code files to C code. The resulting functions can then be imported into other Python scripts. This method can be used to increase the execution speed of a Python script, particularly if the script uses for-loops. I have added a Cython page to:  Vibrationdata Python Wiki The page [...]

Read Full Post »

The goal of this project is to solve a “very large” generalized eigenvalue problem in a “reasonable” amount of time using library functions. The mass and stiffness matrices may be either dense or sparse. Optimum routines are desired for each case. Here is description of the libraries and packages gcc – GNU Compiler Collection for [...]

Read Full Post »

Python Wiki

With the encouragement of my NASA colleagues, I have started a Python Wiki at: http://vibrationdata.com/python-wiki/index.php?title=Main_Page Please visit this site and contribute your own experience. Thank you, Tom Irvine

Read Full Post »

Here is my current method. Please let me know if you have a better one. The input data may be either space, tab, or comma delimited. ########################################################################## import os import re from numpy import array,zeros,concatenate,linspace,std from sys import stdin import matplotlib.pyplot as plt ######################################################################## def start(): print(” “) print(“Entpath =stdin.readline() file_path = input_file_path.rstrip(‘\n’) if os.path.exists(file_path): [...]

Read Full Post »

Python on Linux

I have installed Linux Ubuntu on my 64-bit Windows PC, turning it into a dual boot configuration. The link is:  http://www.ubuntu.com/download/ubuntu/windows-installer * * * I have also installed the Linux versions of Python & Spyder. Here is a Python installation method from Nick Smith: Part of the beauty of switching to Python is how cross-platform [...]

Read Full Post »

Python Tip

Every Python book and website tutorial recommends the following command for prompting the user for input: raw_input() But I have found that this command is buggy and unreliable. Specifically, I wrote a long, complex code that had several raw_input() commands. The code ran successfully in Spyder. But I received the following error when I ran [...]

Read Full Post »

Python Progress

The Python scripting program, ver 2.7.2, can be freely downloaded from: http://www.python.org/download/  Programmers will also need to install libraries such as NumPy, SciPy and matplotlib, particularly for science and engineering programming. These libraries are also freely available, but their proper installation and integration with Python is tricky. As an alternative, a package of Python with these libraries and [...]

Read Full Post »

Python

I had the opportunity today to speak with several engineers from the Aerospace Corporation.  They said that their organization is beginning a gradual transition from Matlab to Python. Python is an interpreted, interactive, object-oriented, open-source programming language.   In addition, numerical library functions are available for Python. So I am now learning Python.  I will write a set [...]

Read Full Post »

Follow

Get every new post delivered to your Inbox.