ASKSAGE: Sage Q&A Forum - Individual question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Tue, 29 Mar 2011 09:59:54 -0500h_vectors of simplicial complexeshttp://ask.sagemath.org/question/8023/h_vectors-of-simplicial-complexes/In the documentation for finite simplicial complexes it was described the function h_vector, but when I tried to use it, sage told me that there was not such a property for simplicial complexes. Where can it be the problem?Fri, 25 Mar 2011 00:44:51 -0500http://ask.sagemath.org/question/8023/h_vectors-of-simplicial-complexes/Answer by DSM for <p>In the documentation for finite simplicial complexes it was described the function h_vector, but when I tried to use it, sage told me that there was not such a property for simplicial complexes. Where can it be the problem?</p>
http://ask.sagemath.org/question/8023/h_vectors-of-simplicial-complexes/?answer=12223#post-id-12223Could you edit your message to include a cut-and-paste of exactly what you did and what error message it returned? It seems to work for me just like in the examples, but I'm running Sage 4.6.2 and don't know about earlier versions:
sage: X = SimplicialComplex(3, [[0,1], [1,2], [2,3], [3,0]])
sage: X
Simplicial complex with vertex set (0, 1, 2, 3) and facets {(1, 2), (2, 3), (0, 3), (0, 1)}
sage: X.h_vector()
[1, 2, 1]
Fri, 25 Mar 2011 00:48:21 -0500http://ask.sagemath.org/question/8023/h_vectors-of-simplicial-complexes/?answer=12223#post-id-12223Comment by John Palmieri for <p>Could you edit your message to include a cut-and-paste of exactly what you did and what error message it returned? It seems to work for me just like in the examples, but I'm running Sage 4.6.2 and don't know about earlier versions:</p>
<pre><code>sage: X = SimplicialComplex(3, [[0,1], [1,2], [2,3], [3,0]])
sage: X
Simplicial complex with vertex set (0, 1, 2, 3) and facets {(1, 2), (2, 3), (0, 3), (0, 1)}
sage: X.h_vector()
[1, 2, 1]
</code></pre>
http://ask.sagemath.org/question/8023/h_vectors-of-simplicial-complexes/?comment=21942#post-id-21942The patch for h-vectors was merged in Sage 4.6.2, so yes, you need to upgrade.Fri, 25 Mar 2011 04:36:48 -0500http://ask.sagemath.org/question/8023/h_vectors-of-simplicial-complexes/?comment=21942#post-id-21942Comment by EmersonL for <p>Could you edit your message to include a cut-and-paste of exactly what you did and what error message it returned? It seems to work for me just like in the examples, but I'm running Sage 4.6.2 and don't know about earlier versions:</p>
<pre><code>sage: X = SimplicialComplex(3, [[0,1], [1,2], [2,3], [3,0]])
sage: X
Simplicial complex with vertex set (0, 1, 2, 3) and facets {(1, 2), (2, 3), (0, 3), (0, 1)}
sage: X.h_vector()
[1, 2, 1]
</code></pre>
http://ask.sagemath.org/question/8023/h_vectors-of-simplicial-complexes/?comment=21943#post-id-21943I have a 4.6.1 version of sage, but is installed somewhere else, so I cannot send you the precise error message. I think I should try an update... Thanks!Fri, 25 Mar 2011 01:13:33 -0500http://ask.sagemath.org/question/8023/h_vectors-of-simplicial-complexes/?comment=21943#post-id-21943Answer by EmersonL for <p>In the documentation for finite simplicial complexes it was described the function h_vector, but when I tried to use it, sage told me that there was not such a property for simplicial complexes. Where can it be the problem?</p>
http://ask.sagemath.org/question/8023/h_vectors-of-simplicial-complexes/?answer=12233#post-id-12233I also noticed that there where no h_vectors in the old documentation... However I messed everything up with the upgrade and now nothing is working (I didn't check before the right way to do it and try to reinstall everything from the begining). This is the situation now: when I run ./sage I get a long message telling at the end:
ImportError: libgfortran.so.3: cannot open shared object file: No such file or directory
Error importing ipy_profile_sage - perhaps you should run %upgrade?
WARNING: Loading of ipy_profile_sage failed.
then after running %upgrade I get the following
sage: %upgrade
> /home/emerson/sage-4.6.2/local/bin/python "/home/emerson/sage-4.6.2/local/lib/python2.6/site-packages/IPython/upgrade_dir.py" "/home/emerson/sage-4.6.2/local/lib/python2.6/site-packages/IPython/UserConfig" "/home/emerson/.sage/ipython"
/home/emerson/.sage/ipython/__init__.py: Unedited, installing new version
/home/emerson/.sage/ipython/ipy_user_conf.py: Unedited, installing new version
and then
sage: 1+1
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
/home/emerson/sage-4.6.2/local/bin/<ipython console> in <module>()
NameError: name 'Integer' is not defined
I hope you can tell me what to do now...Tue, 29 Mar 2011 05:42:06 -0500http://ask.sagemath.org/question/8023/h_vectors-of-simplicial-complexes/?answer=12233#post-id-12233Comment by niles for <p>I also noticed that there where no h_vectors in the old documentation... However I messed everything up with the upgrade and now nothing is working (I didn't check before the right way to do it and try to reinstall everything from the begining). This is the situation now: when I run ./sage I get a long message telling at the end:</p>
<pre><code> ImportError: libgfortran.so.3: cannot open shared object file: No such file or directory
Error importing ipy_profile_sage - perhaps you should run %upgrade?
WARNING: Loading of ipy_profile_sage failed.
</code></pre>
<p>then after running %upgrade I get the following</p>
<pre><code>sage: %upgrade
> /home/emerson/sage-4.6.2/local/bin/python "/home/emerson/sage-4.6.2/local/lib/python2.6/site-packages/IPython/upgrade_dir.py" "/home/emerson/sage-4.6.2/local/lib/python2.6/site-packages/IPython/UserConfig" "/home/emerson/.sage/ipython"
/home/emerson/.sage/ipython/__init__.py: Unedited, installing new version
/home/emerson/.sage/ipython/ipy_user_conf.py: Unedited, installing new version
</code></pre>
<p>and then</p>
<pre><code>sage: 1+1
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
/home/emerson/sage-4.6.2/local/bin/<ipython console> in <module>()
NameError: name 'Integer' is not defined
</code></pre>
<p>I hope you can tell me what to do now...</p>
http://ask.sagemath.org/question/8023/h_vectors-of-simplicial-complexes/?comment=21939#post-id-21939yes, I think deleting your old install and downloading a fresh copy of sage will be the quickest way to resolve this. Things from your ~/.sage directory (in particular, all of your notebook worksheets) should be unaffected by this.Tue, 29 Mar 2011 09:59:54 -0500http://ask.sagemath.org/question/8023/h_vectors-of-simplicial-complexes/?comment=21939#post-id-21939