GithubHelp home page GithubHelp logo

Comments (5)

timdiller avatar timdiller commented on July 19, 2024

In which file do you see the above lines? Are you using any of the scimath.units code in a GUI? I'm curious to know since the the traitsui dependencies should be optional and only needed if you are already using traitsui.

from scimath.

saschagottfried avatar saschagottfried commented on July 19, 2024

This line is from http://docs.enthought.com/scimath/units/unit_numpy.html

google for this import line. first three hits links to scimath documentation. Thanks for fixing the dependencies. Is this package still recommended for working with unit objects ? Any suggestions?

Sorry for have missed the ImportError in the first report. Was kind of misleading you.

from scimath.units.api import UnitScalar
Traceback (most recent call last):
File "", line 1, in
File "/home/gottfried/buildouts/temp/lib/python2.6/site-packages/scimath/units/api.py", line 21, in
from quantity import Quantity
File "/home/gottfried/buildouts/temp/lib/python2.6/site-packages/scimath/units/quantity.py", line 39, in
class Quantity(HasPrivateTraits):
File "/home/gottfried/buildouts/temp/lib/python2.6/site-packages/traits/has_traits.py", line 645, in new
mhto = MetaHasTraitsObject( cls, class_name, bases, class_dict, False )
File "/home/gottfried/buildouts/temp/lib/python2.6/site-packages/traits/has_traits.py", line 767, in init
value = _check_trait( value )
File "/home/gottfried/buildouts/temp/lib/python2.6/site-packages/traits/has_traits.py", line 331, in _check_trait
return trait_factory( trait )
File "/home/gottfried/buildouts/temp/lib/python2.6/site-packages/traits/traits.py", line 519, in trait_factory
_trait_factory_instances[ tid ] = trait()
File "/home/gottfried/buildouts/temp/lib/python2.6/site-packages/traits/traits.py", line 487, in call
return self.maker_function( _args, *_metadata )
File "/home/gottfried/buildouts/temp/lib/python2.6/site-packages/scimath/units/family_name_trait.py", line 94, in family_name_traits_factory_function
from traitsui.api import EnumEditor
ImportError: No module named traitsui.api

steps to reproduce

  • Create a virtualenv with access to numpy
  • pip install scimath
  • run python interpreter
  • from scimath.units.api import UnitScalar

from scimath.

timdiller avatar timdiller commented on July 19, 2024

This is helpful. We are taking a look at the dependency situation and will report back here.

We still make use of scimath units for some of our applications where appropriate. It works fairly well when implemented as unitted functions and for physical units. It can be a little inconvenient to use the UnitScalars and UnitArrays directly since some part of the value ends up getting stored in the unit, but that it certainly manageable. The biggest limitation of scimath units is that it is not easily extended non-physical units in a useful way. For example, it would not work well to use it for dollars to euros conversion; also it would inappropriately allow operations between any two non-dimensional units like radians and refractive index. We have ideas for how to fix it, but it is not a high priority with current time and resource constraints.

from scimath.

saschagottfried avatar saschagottfried commented on July 19, 2024

Thanks for your notes on features and limits of scimath.

from scimath.

rahulporuri avatar rahulporuri commented on July 19, 2024

Closing as the issue seems to have been fixed in #57

from scimath.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.