Ask Your Question

kartikv's profile - activity

2018-09-27 03:34:42 -0600 received badge  Famous Question (source)
2014-04-30 23:16:00 -0600 received badge  Notable Question (source)
2012-09-11 12:38:36 -0600 received badge  Popular Question (source)
2012-01-23 09:03:00 -0600 received badge  Student (source)
2012-01-23 06:01:00 -0600 asked a question Interpreting ints as ints

I am working with a python package called Theano, which has a function called "function" which basically takes in the symbolic representation of a function and compiles it for fast execution on a block of memory either on a CPU or a GPU. When trying to use it in sage, however, it gets a bit flummoxed by the fact that integers and such are interpreted as sage integers, rather than python basic types. Is there a way to (at runtime) turn off that part of the interpreter, so that code doesn't have to be rewritten to work in sage?

2012-01-23 05:09:55 -0600 asked a question Bug in initializing random

Or maybe a feature? In normal python + numpy

import numpy.random as random random.RandomState(22)

works as expected, whereas in sage, the input has to be an array (e.g. [22]). Anyone know why?

2012-01-16 07:36:53 -0600 asked a question How to import nonstandard python packages in sage nb

I am trying to import a non-standard python package (particularly, theano) into sage: I can copy the package to the main sage directory to allow me to import it from the command line, but it does not seem to like doing it inside the notebook. For reference, my sage is in /usr/local/sage-4.7.2/, and the package is just a folder inside (with the usual __init__.py).

2012-01-12 02:47:31 -0600 received badge  Nice Answer (source)
2012-01-10 23:27:48 -0600 received badge  Teacher (source)
2012-01-10 14:54:14 -0600 answered a question Can I show the edge weights on a graph in a drawing?

Don't know how to animate a graph, but

G = DiGraph(A, format='weighted_adjacency_matrix') H = G.plot(edge_labels=True, graph_border=True) H.show()

will display the weights in a graph with adj matrix A.