2023-04-19 14:47:06 +0200 | received badge | ● Notable Question (source) |
2022-07-20 11:51:55 +0200 | received badge | ● Famous Question (source) |
2021-06-04 23:57:44 +0200 | received badge | ● Famous Question (source) |
2021-01-11 10:38:48 +0200 | received badge | ● Famous Question (source) |
2018-06-27 18:54:55 +0200 | received badge | ● Notable Question (source) |
2018-02-26 12:36:23 +0200 | received badge | ● Notable Question (source) |
2018-02-26 12:36:23 +0200 | received badge | ● Popular Question (source) |
2017-08-14 10:55:37 +0200 | received badge | ● Taxonomist |
2017-05-28 00:26:33 +0200 | received badge | ● Popular Question (source) |
2016-06-11 18:37:13 +0200 | received badge | ● Popular Question (source) |
2016-04-23 05:29:51 +0200 | received badge | ● Famous Question (source) |
2016-04-08 09:34:02 +0200 | received badge | ● Popular Question (source) |
2016-04-08 09:34:02 +0200 | received badge | ● Notable Question (source) |
2016-01-27 15:12:30 +0200 | received badge | ● Popular Question (source) |
2016-01-27 15:12:30 +0200 | received badge | ● Notable Question (source) |
2016-01-27 15:12:28 +0200 | received badge | ● Popular Question (source) |
2016-01-27 09:07:12 +0200 | asked a question | VM Virtualbox & sage-7.0.ova: how to start? Hi, I downloaded sage-7.0.ova and I imported it in VM Virtualbox. What are the next steps? Using http://localhost:8000/home/admin within my browser doesn't work, as it did up to sage-6.10.ova. Are these the steps for Sage-7.0 for Windows / VM Virtualbox? If so, how to upload my *.sws files? Thanks for answering. |
2016-01-18 22:37:00 +0200 | commented question | Smart set (database?) Yes, the examples behave different. In general if [A[B[C]]] and [X[Y[Z]]] are element of the structure, I want to define what A+X, B+Y and C+Z are. It can be concatenating a list or the addition of numbers. The structure therefor must be defined including the addition operators. |
2016-01-16 22:55:50 +0200 | commented question | Smart set (database?) For me [1,2] + [3,4] yields [1,2,3,4]. |
2016-01-15 21:46:28 +0200 | asked a question | Smart set (database?) Hi, What I would like is to define a smart hierarchical set (or database) like: The lefthand side is an hierarchy (a,b,c,d,e,...); the righthand side is some structure [, [,,,...]] consisting of nested lists. How can I quickly -via a smart design- determine for instance the sum for a higher level? For instance example_set.sum[(0,0)] would yield [4-5, [7,11,0] + [8,-3,6]] and example_set.sum[(0,)] yields [4-5+4, [7,11,0] + [8,-3,6] + [7,11,-1]]. The setting is that we have a few thousand hierarchical elements with unknown depth, but always the same structure on the righthand side. The structure could contain many nested lists with in total several hunderd values (flattened). I like to have (fast) basic operators for the lists within the structure such as addition and index. Another example. I considered to define a class and I looked at database. But that didn't help me much :( To complicate matters, I would also like to connect hierarchical levels (one-direction). For instance in the first example assume (0,0,0) is connected to (0,1,1). How to store and display such a connection? For connections I looked for instance at igraph. But it isn't clear to me whether it would be helpful in combination with the above mentioned set design. To summarize: it would be awesome if a routine 'smart_set(n, structure)' would define a n-level hierarchy whereby operations like .sum(input) and .sum.connected(input) and .show_graph() would work. Suggestions how to move forward in Sage are much appreciated! Roland |
2015-03-07 14:14:51 +0200 | answered a question | solve 2 equations in terms of other variables Hint: please avoid 'sqrt' within equations. |
2015-01-20 23:57:21 +0200 | answered a question | About roots of a certain polynomial equation I assume you are wondering why Sage is not recognizing that $(x^2 - 6)x^2 - 4x(e^{\frac{2}{5}i\pi} + e^{\frac{-2}{5}i\pi}) - e^{\frac{4}{5}i\pi} - e^{\frac{-4}{5}i\pi} - 1=(x^2 - 6)x^2 - 8xcos(\frac{2}{5}\pi) - 2*cos(\frac{4}{5}\pi) - 1$, and thereafter doesn't find the four real roots: $x=-2.1755705045849463, -0.618033988749891, 0.17557050458494627, 2.618033988749895$. Mixing the world of solving algebraic equations - which are exact - with the world of finding roots - which are approximations - is seldom a good idea. If you would split both worlds, it goes fluently. Stated differently, always simplify your function (= exact) before going into a numerical process such as root finding. Any system - thus also Sage - hangs up because it is impossible to determine the simplification numerically. |
2014-12-03 19:08:39 +0200 | answered a question | Generate a conditional list of integers Hi, Generating a long list takes time. If speed is an issue too, you could consider defining your own squarefree test. Test it: Enjoy speed: |
2014-11-25 13:44:22 +0200 | received badge | ● Nice Answer (source) |
2014-11-24 17:54:19 +0200 | answered a question | Lower prime divisor There a two ways to avoid calculating all prime divisors. Firstly, look at "trial_division". It gives the first prime divisor. Secondly, you can use n.factor(limit=yoursearchlimit). |
2014-08-08 22:04:49 +0200 | asked a question | TimeSeries & cython: why cimport yellow? I get the following information from cython: I wasn't expecting a yellow color for cpdef a = TimeSeries(aantal). Any suggestions? |
2014-08-03 07:35:22 +0200 | received badge | ● Enthusiast |
2014-07-10 00:17:08 +0200 | answered a question | How to do an "if" block in Sage? Maybe you get confused by the fact that gcd(0,3) equals 3. If I print each step, it works as expected. |
2014-06-29 22:45:18 +0200 | answered a question | Solving ax^2+bxy+cy^2=n fast? Thanks for all replies! Yes, I'm looking at integers. A few months ago Thilina Rathnayake implemented routines in Sympy (http://thilinaatsympy.wordpress.com/2013/09/14/status-of-the-diophantine-module-2/). This seems to me a good start as Sympy is a standard package. I'll have a 2nd look at my routines and I'll provide a link within a few days (if that's still wanted). Roland |
2014-06-29 22:29:24 +0200 | received badge | ● Nice Question (source) |
2014-06-29 21:25:57 +0200 | received badge | ● Notable Question (source) |
2014-06-29 21:25:57 +0200 | received badge | ● Popular Question (source) |
2014-06-29 21:25:57 +0200 | received badge | ● Famous Question (source) |
2014-06-29 21:20:18 +0200 | received badge | ● Famous Question (source) |
2014-06-29 21:20:18 +0200 | received badge | ● Notable Question (source) |
2014-06-29 21:20:18 +0200 | received badge | ● Popular Question (source) |
2013-12-23 03:43:39 +0200 | asked a question | Dividing by 2 fast: how? Please consider the following example:
tt=1200 The division by 4 goes fast. But how can I divide by 2? The expression tt>2 yields a boolean. And the options ss=tt//2 and ss=tt; ss/=2 seem not optimal.
timeit("tt=1200;ss=tt>>2") 625 loops, best of 3: 152 ns per loop Thanks for you kind consideration. |
2013-12-17 12:10:37 +0200 | received badge | ● Teacher (source) |
2013-12-17 00:26:34 +0200 | answered a question | Load data when running Sage from a VM in Windows It isn't easy. In fact it is a daunting task. Why? You have the overcome the difficulties of matching two operating systems. If files are small <<1Mb, I use the "Data" option which you find at the top. For larger sizes, I found this commend helpfull to understand the issues, and you find detailed instructions here. If it works, it works, but it took me months ... Success! |
2013-11-19 02:29:11 +0200 | received badge | ● Supporter (source) |
2013-10-25 05:42:32 +0200 | asked a question | How to translate text (easily)? Dear community, More and more interesting *.sws examples are posted on various sites. For instance on this site. Although the Dutch education system supports English, French, German, Latin and Greek, I still would appreciate if I could (easily) translate text via a 'similar to Google Translate'-facility. From "X" to English would be perfect as a start. Has someone any suggestions? Thanks in advance for your kind reply! (I'm using Win7-64 + VM Virtualbox + 5.12 + Google Chrome) Roland |
2013-06-19 05:10:33 +0200 | commented answer | PySDE: How to import this Python package? Hi, Thanks for yor swift reply! I got an error when applying step 4: sde_wrap.cpp does not exist.. :( |
2013-06-18 16:56:53 +0200 | asked a question | PySDE: How to import this Python package? Hi, how can I add PySDE [https://github.com/hobu/pysde/blob/ma...] to Sage? I use version 5.9 Win64 VBox. I want to run: """ add required Python packages """ from pysde import * from sympy import * """ Variables acclaimed """ x,dx=symbols('x dx') r,G,e,d=symbols('r G epsilon delta') """ Solve Kolmogorov Forward Equation """ l=sde.KolmogorovFE_Spdf(r(G-x),ex(1-x),0,1) sol=l.subs({e:rd}) pprint(sol) Thanks! Roland |
2013-03-19 13:32:01 +0200 | answered a question | Radical Sign in answer? Use variables to solve the equation symbolically: var('a','b','c','t') S = solve([at^2 + bt + c], t) print S [t == -1/2(b + sqrt(-4ac + b^2))/a,t == -1/2(b - sqrt(-4ac + b^2))/a] Then define g: g(a,b,c,t)=S[0].rhs() show(g) $\newcommand{\Bold}[1]{\mathbf{#1}}\left( a, b, c, t \right) \ {\mapsto} \ -\frac{b + \sqrt{-4 \ a c + b^{2}}}{2 \ a}$ That is how I would write it by hand.
g(-16,48,5) 1/4*sqrt(41) + 3/2 I hope it helps. |
2013-01-19 10:04:51 +0200 | asked a question | How to use E.T.E. a Python tree package within Sage? Hi, ETE is a Python based tree building package with nice graphical support. Can I use it within Sage? Thanks, Roland |
2013-01-14 00:06:48 +0200 | answered a question | definition of gcd for(x,y) |
2013-01-11 17:08:57 +0200 | answered a question | sage recursive functions programming Hi, I have used a Boolean to distinguish the states: 'a'=True and 'b'=False. @cached_function def recur(string,initial_state): Does this answer your question? Roland |