#8427: notebook fortran mode does not work with blank first line (or subroutine
starting on first line)
-------------------------------------------------+-------------------------
Reporter: jason | Owner: was
Type: defect | Status: new
Priority: major | Milestone: sage-6.4
Component: interfaces | Resolution:
Keywords: | Merged in:
Authors: | Reviewers:
Report Upstream: Reported upstream. Developers | Work issues:
acknowledge bug. | Commit:
Branch: | Stopgaps:
Dependencies: |
-------------------------------------------------+-------------------------
Comment (by jdemeyer):
It works in the command line:
{{{
sage: from sage.misc.inline_fortran import InlineFortran
sage: fortran = InlineFortran(globals())
sage: fortran.eval("""
Subroutine Rescale(a,b,n)
Implicit none
Integer n,i,j
Real*8 a(n,n), b
Cf2py intent(in,out) a
do i = 1,n
do j=1,n
a(i,j)=b*a(i,j)
end do
end do
end
""")
sage: import numpy
sage: a = numpy.array([[1,2],[3,4]], dtype=float)
sage: rescale(a, 2.0)
array([[ 2., 4.],
[ 6., 8.]])
}}}
--
Ticket URL: <http://trac.sagemath.org/ticket/8427#comment:6>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.