Skip to content

Commit

Permalink
Merge branch 'alfrenardi-develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
wd15 committed Apr 9, 2015
2 parents ba45a99 + f650055 commit 1e4e318
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
7 changes: 2 additions & 5 deletions fipy/tools/dimensions/physicalField.py
Original file line number Diff line number Diff line change
Expand Up @@ -624,11 +624,8 @@ def __array_wrap__(self, arr, context=None):
>>> print type(numerix.array([1.0, 2.0]) * PhysicalField([1.0, 2.0], unit="m"))
<class 'fipy.tools.dimensions.physicalField.PhysicalField'>
For not very intelligible reasons, the `PhysicalField`\ness gets cast
away if there are no units. Probably not harmful, so not worth investigating
>>> print type(numerix.array([1.0, 2.0]) * PhysicalField([1.0, 2.0])) is type(numerix.array(1))
1
>>> print type(numerix.array([1.0, 2.0]) * PhysicalField([1.0, 2.0]))
<class 'fipy.tools.dimensions.physicalField.PhysicalField'>
>>> from scipy.special import gamma as Gamma # doctest: +SCIPY
>>> print type(Gamma(PhysicalField([1.0, 2.0]))) is type(numerix.array(1)) # doctest: +SCIPY
Expand Down
4 changes: 2 additions & 2 deletions fipy/variables/meshVariable.py
Original file line number Diff line number Diff line change
Expand Up @@ -533,10 +533,10 @@ def _shapeClassAndOther(self, opShape, operatorClass, other):
>>> savedFilters = list(warnings.filters)
>>> warnings.resetwarnings()
>>> warnings.simplefilter("error", UserWarning, append=True)
>>> C = CellVariable(mesh=mesh) * (A * B)
>>> C = (A * B) * CellVariable(mesh=mesh)
Traceback (most recent call last):
...
UserWarning: The expression `(multiply([0 1 2 3 4], Variable(value=array(1.0))))` has been cast to a constant `CellVariable`
UserWarning: The expression `(Variable(value=array(1.0)) * [0 1 2 3 4])` has been cast to a constant `CellVariable`
>>> warnings.filters = savedFilters
"""
otherShape = numerix.getShape(other)
Expand Down

0 comments on commit 1e4e318

Please sign in to comment.