Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement %%fortran in Jupyter #22654

Closed
jdemeyer opened this issue Mar 20, 2017 · 15 comments
Closed

Implement %%fortran in Jupyter #22654

jdemeyer opened this issue Mar 20, 2017 · 15 comments

Comments

@jdemeyer
Copy link

CC: @kcrisman

Component: notebook

Keywords: days86

Author: Jeroen Demeyer

Branch/Commit: 6cf97b0

Reviewer: Volker Braun, Sébastien Labbé

Issue created by migration from https://trac.sagemath.org/ticket/22654

@jdemeyer jdemeyer added this to the sage-8.0 milestone Mar 20, 2017
@jdemeyer
Copy link
Author

@jdemeyer
Copy link
Author

Commit: 9ae0c04

@jdemeyer
Copy link
Author

Author: Jeroen Demeyer

@jdemeyer
Copy link
Author

New commits:

9ae0c04Add %%fortran cell magic

@vbraun
Copy link
Member

vbraun commented Mar 21, 2017

Reviewer: Volker Braun

@vbraun
Copy link
Member

vbraun commented Mar 31, 2017

comment:4
[dochtml] [arithgrou] build succeeded.
[dochtml] Build finished.  The built documents can be found in /local/sage-patchbot/sage/local/share/doc/sage/inventory/en/reference/arithgroup
[dochtml] Error building the documentation.
[dochtml] Traceback (most recent call last):
[dochtml]   File "/local/sage-patchbot/sage/local/lib/python/runpy.py", line 174, in _run_module_as_main
[dochtml]     "__main__", fname, loader, pkg_name)
[dochtml]   File "/local/sage-patchbot/sage/local/lib/python/runpy.py", line 72, in _run_code
[dochtml]     exec code in run_globals
[dochtml]   File "/local/sage-patchbot/sage/local/lib/python2.7/site-packages/sage_setup/docbuild/__main__.py", line 2, in <module>
[dochtml]     main()
[dochtml]   File "/local/sage-patchbot/sage/local/lib/python2.7/site-packages/sage_setup/docbuild/__init__.py", line 1667, in main
[dochtml]     builder()
[dochtml]   File "/local/sage-patchbot/sage/local/lib/python2.7/site-packages/sage_setup/docbuild/__init__.py", line 316, in _wrapper
[dochtml]     getattr(get_builder(document), 'inventory')(*args, **kwds)
[dochtml]   File "/local/sage-patchbot/sage/local/lib/python2.7/site-packages/sage_setup/docbuild/__init__.py", line 510, in _wrapper
[dochtml]     build_many(build_ref_doc, L)
[dochtml]   File "/local/sage-patchbot/sage/local/lib/python2.7/site-packages/sage_setup/docbuild/__init__.py", line 252, in build_many
[dochtml]     ret = x.get(99999)
[dochtml]   File "/local/sage-patchbot/sage/local/lib/python/multiprocessing/pool.py", line 567, in get
[dochtml]     raise self._value
[dochtml] RuntimeError: the user-space globals dictionary has not been initialized. Use initialize_globals() or set_globals() or use a different function which doesn't need these globals

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Apr 3, 2017

Changed commit from 9ae0c04 to e43b10b

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Apr 3, 2017

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

e43b10bAdd %%fortran cell magic

@seblabbe
Copy link
Contributor

comment:7

Code works. It took me a while to understand how to use that FIB function:

L = [0,0,0,0,0]
fib(L, 5)
L

in a cell returns [0,0,0,0,0]. Also why fib instead of FIB?

Finally, the doc from fortran?? was helpful to me. I would suggest not only to copy the fortran code from fortran?? doc but also include how to use it using numpy arrays:

            sage: import numpy
            sage: a = numpy.array(range(10), dtype=float)
            sage: fib(a, 10)
            sage: a
            array([  0.,   1.,   1.,   2.,   3.,   5.,   8.,  13.,  21.,  34.])

@seblabbe
Copy link
Contributor

Changed keywords from none to days86

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Apr 20, 2017

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

6cf97b0Add %%fortran cell magic

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Apr 20, 2017

Changed commit from e43b10b to 6cf97b0

@jdemeyer
Copy link
Author

comment:10

Thanks! I added the doctest (and rebased on 8.0.beta2).

@seblabbe
Copy link
Contributor

Changed reviewer from Volker Braun to Volker Braun, Sébastien Labbé

@vbraun
Copy link
Member

vbraun commented Apr 23, 2017

Changed branch from u/jdemeyer/implement___fortran_in_jupyter to 6cf97b0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants