Skip to content

Commit

Permalink
Merge branch 'develop' into ticket457-Make_the_citation_links_go_to_t…
Browse files Browse the repository at this point in the history
…he_DOI_links
  • Loading branch information
wd15 committed Sep 11, 2013
2 parents 5dfdc19 + 96d5155 commit f5153cc
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ or a
.. _NIST: http://www.nist.gov/
.. _compressed archive: http://www.ctcms.nist.gov/fipy/download/FiPy-1.1.tar.gz
.. _tracking system: http://matforge.org/fipy/report
.. _mailing list: http://www.ctcms.nist.gov/fipy/mail.html
.. _mailing list: http://www.ctcms.nist.gov/fipy/documentation/MAIL.html
.. _Sourceforge: http://www.sourceforge.net/projects/fipy
.. _Materials Digital Library Pathway: http://matdl.org
.. _MatForge: http://matforge.org/
Expand Down
1 change: 1 addition & 0 deletions documentation/_themes/nist/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<script type="text/javascript" src="http://www.nist.gov/js/spry/SpryDOMUtils.js"></script>
<script type="text/javascript" src="http://www.nist.gov/js/spry/SpryMenuBar.js"></script>
<script type="text/javascript" src="http://www.nist.gov/js/spry/menu_bar.js"></script>
<script language="JavaScript" id="_fed_an_js_tag" src="/js/federated-analytics.all.min.js?agency=NIST&subagency=ctcms&pua=UA-37115410-17&yt=true"></script>
{{ super() }}
{% endblock %}
{% set reldelim1 = ' &gt;' %}
Expand Down
6 changes: 5 additions & 1 deletion fipy/tools/dimensions/physicalField.py
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,11 @@ def itemset(self, value):
>>> print a.allclose("1.8288 m")
1
>>> a = PhysicalField(((3.,4.),(5.,6.)),"m")
>>> a.itemset(PhysicalField("6 ft"))
>>> try:
... a.itemset(PhysicalField("6 ft"))
... except IndexError:
... # NumPy 1.7 has changed the exception type
... raise ValueError("can only place a scalar for an array of size 1")
Traceback (most recent call last):
...
ValueError: can only place a scalar for an array of size 1
Expand Down
10 changes: 8 additions & 2 deletions fipy/tools/numerix.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,8 +337,14 @@ def tostring(arr, max_line_width=75, precision=8, suppress_small=False, separato
return _formatFloat(arr, format='%%1.%df' % precision)

elif isInt(arr):
from numpy.core.arrayprint import _formatInteger
return _formatInteger(arr, format='%d')
try:
## this is for numpy 1.7 and above
## why has the interface changed again?
from numpy.core.arrayprint import IntegerFormat
return IntegerFormat(NUMERIX.array((arr,)))(arr).strip()
except:
from numpy.core.arrayprint import _formatInteger
return _formatInteger(arr, format='%d')
else:
raise TypeError, 'cannot convert ' + str(arr) + ' to string'

Expand Down

0 comments on commit f5153cc

Please sign in to comment.