Ask Your Question

kartikv's profile - activity

2018-09-27 10:34:42 +0100 received badge  Famous Question (source)
2014-05-01 06:16:00 +0100 received badge  Notable Question (source)
2012-09-11 19:38:36 +0100 received badge  Popular Question (source)
2012-01-23 16:03:00 +0100 received badge  Student (source)
2012-01-23 13:01:00 +0100 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 12:09:55 +0100 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 14:36:53 +0100 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

2012-01-12 09:47:31 +0100 received badge  Nice Answer (source)
2012-01-11 06:27:48 +0100 received badge  Teacher (source)
2012-01-10 21:54:14 +0100 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)

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