/usr/share/pyshared/openopt/examples/sle_1.py is in python-openopt 0.38+svn1589-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | __docformat__ = "restructuredtext en"
from numpy import *
from openopt import SLE
N = 1000
C = empty((N,N))
d = 1.5+80*sin(arange(N))
for j in xrange(N):
C[j] = 8*sin(4.0+arange(j, N+j)**2) + 15*cos(j)
p = SLE(C, d)
#r = p.solve('defaultSLEsolver'), or just
r = p.solve()
print('max residual: %e' % r.ff)
#print('solution: %s' % r.xf)
|