diff --git a/README.txt b/README.txt index ccaac7d7f9..4cc426be91 100644 --- a/README.txt +++ b/README.txt @@ -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/ diff --git a/documentation/_themes/nist/layout.html b/documentation/_themes/nist/layout.html index 534f7d5799..73444ae2b8 100644 --- a/documentation/_themes/nist/layout.html +++ b/documentation/_themes/nist/layout.html @@ -7,6 +7,7 @@ + {{ super() }} {% endblock %} {% set reldelim1 = ' >' %} diff --git a/fipy/tools/dimensions/physicalField.py b/fipy/tools/dimensions/physicalField.py index d0c7e1b4a3..c028a3fd9e 100755 --- a/fipy/tools/dimensions/physicalField.py +++ b/fipy/tools/dimensions/physicalField.py @@ -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 diff --git a/fipy/tools/numerix.py b/fipy/tools/numerix.py index 9e5d617750..1200dbc0b6 100644 --- a/fipy/tools/numerix.py +++ b/fipy/tools/numerix.py @@ -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'