Cross-platform Issues

This section describes cross-platform issues that may emerge and provides possible solutions for them.

Numpy integer type

Issues may arise when comparing Numpy integer types with Python int(). Python int() equivalent Numpy integer type on Windows (Win7 64bit, Python 32bit) is int32, while on Linux (Ubuntu 64bit) it is int64. For example, the statement isinstance(np.array([1], np.int64), int) may return True resulting in unexpected behavior in ProDy functions or methods. If Numpy integer type needs to be specified, using int seems a safe option.

Relative paths

os.path.relpath() function raises exceptions when the working directory and the path of interest are on separate drives, e.g. trying to write a C:\temp while running tests on D:\ProDy. Instead of this os.path.relpath(), ProDy function relpath() should be used to avoid problems.