473,396 Members | 1,826 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

representing physical units

I know that python packages are available for representing physical
units, but I am getting frustrated trying to find them and determine
which is the best.

Rather than just using conventional dimensionless numbers with implicit
units, I would like to have a way to explicitly represent the units. If
incompatible units are added or subtracted, I would like to have an
error detected. Auto-conversions (e.g., from feet to miles) to enforce
consistency before adding or subtracting are not necessary. I would
even like to be able to multiply units. For example, I would like to
have meters returned when I multiply meters/second by seconds.

Where can I find a good package that does this? Thanks.

Feb 9 '06 #1
2 1389
Russ wrote:
I know that python packages are available for representing physical
units, but I am getting frustrated trying to find them and determine
which is the best. Where can I find a good package that does this? Thanks.


Unum is a special package just for this purpose:
http://home.tiscali.be/be052320/Unum.html

ScientificPython http://starship.python.net/~hinsen/ScientificPython/
has a simmilar module, but it depends on Numeric package.

Ziga

Feb 9 '06 #2
Russ schrieb:
I know that python packages are available for representing physical
units, but I am getting frustrated trying to find them and determine
which is the best.

Rather than just using conventional dimensionless numbers with implicit
units, I would like to have a way to explicitly represent the units. If
incompatible units are added or subtracted, I would like to have an
error detected. Auto-conversions (e.g., from feet to miles) to enforce
consistency before adding or subtracting are not necessary. I would
even like to be able to multiply units. For example, I would like to
have meters returned when I multiply meters/second by seconds.

Where can I find a good package that does this? Thanks.


Look at http://sourceforge.net/projects/unum/
Enjoy
Michael
Feb 10 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Adrian Gibbons | last post by:
Hello, I need to get the units of a number. i.e. if I had 12345 then I would want '5'. I was looking at dividing the number by ten and using the modulus operator repeatedly until I had only...
34
by: E. Robert Tisdale | last post by:
Please find attached the physical constants header file physical.h It defines conversion factors to mks units. It might be used like this: > cat main.cc #include<iostream>...
16
by: Dave | last post by:
I would like to create a table in HTML that represents a letter on a standard size sheet of paper. But of course, smaller so the width fits on the screen. How do I code an HTML table to...
5
by: Javaman59 | last post by:
I just saw an interesting identifier in a C# book I'm reading... double dollarsPerHead This jumped out at me, as it is not common to put units in an identifer. We don't see...
2
by: TheSeeker | last post by:
Hi, As part of a larger project, I am trying to use the GNU Units program to provide unit conversions between quantities. My first iteration, which worked OK, was to simply use units as a...
1
by: Greg | last post by:
Hi, I need to implement a table in XBRL. Let's assume I have 2 simple tables to define: TABLE 1 col1 col2 row1 A C row2 B D TABLE 2
7
by: Mark | last post by:
Hi, I am creating application in VB 2005. and when I print report it adds extra 0.45 cm margin on left and top, and the reason for this is physical margins of printer. Is it possible to change...
1
by: Robert Dodier | last post by:
Hello, I am interested in the problem of communicating physical quantities, e.g. between a web service and its client. I am sure there has been a lot of work on that, so there seems no need for...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.