Re: [sage-support] Sagemanifolds error in example notebook

2024-02-07 Thread Matthias Koeppe
On Wednesday, February 7, 2024 at 7:00:07 AM UTC-8 Eric Gourgoulhon wrote:

I don't know about any automated way to check that the example notebooks 
are up to date.


One can use "jupyter nbconvert --to notebook --execute" for this
https://nbconvert.readthedocs.io/en/latest/execute_api.html

 

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/6fc4764c-b4e9-439a-a359-97fd52372facn%40googlegroups.com.


Re: [sage-support] Re: Sagemanifolds: object has no attribute 'exterior_der'

2024-02-07 Thread G. M.-S.
Just to say that
https://ask.sagemath.org
gives me
502 Bad Gateway

Guillermo

On Wed, 7 Feb 2024 at 19:35, Eric Gourgoulhon 
wrote:

> Le mercredi 7 février 2024 à 15:46:05 UTC+1, Dominic Steinitz a écrit :
>
> The example here https://sagemanifolds.obspm.fr/examples.html of
>
>
>- Electromagnetism in Minkowski spacetime
>
> 
> [ipynb
>
> ]
>(Electromagnetic field 2-form from E and B, Maxwell equations, conserved
>current, Lorentz force, Poynting vector)
>
> Fails with the error in the title and in more detail below.
>
>
> For reference: this is discussed in the new thread
> https://groups.google.com/g/sage-support/c/yD6k655EWOA/m/3AMzKdpaAQAJ
>
> Besides, the question about the connection forms has been answered on
> https://ask.sagemath.org/
>
> Eric.
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/CANnG18-Hv7Q4Wf0vqFD4epzQ1VXqq_q6c4YL9hDcXTZu5nHxCw%40mail.gmail.com.


[sage-support] Re: Sagemanifolds: object has no attribute 'exterior_der'

2024-02-07 Thread Eric Gourgoulhon
Le mercredi 7 février 2024 à 15:46:05 UTC+1, Dominic Steinitz a écrit :

The example here https://sagemanifolds.obspm.fr/examples.html of 


   - Electromagnetism in Minkowski spacetime 
   

[ipynb 
   
] 
   (Electromagnetic field 2-form from E and B, Maxwell equations, conserved 
   current, Lorentz force, Poynting vector)
   

Fails with the error in the title and in more detail below. 


For reference: this is discussed in the new 
thread https://groups.google.com/g/sage-support/c/yD6k655EWOA/m/3AMzKdpaAQAJ

Besides, the question about the connection forms has been answered on  
 https://ask.sagemath.org/

Eric.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/6673df0f-7d05-43a8-a391-8d2a33866c01n%40googlegroups.com.


Re: [sage-support] Sagemanifolds error in example notebook

2024-02-07 Thread Eric Gourgoulhon
Le mercredi 7 février 2024 à 16:00:07 UTC+1, Eric Gourgoulhon a écrit :

Indeed, this notebook is 8 years old and is not at all up to date (there is 
even Python 2 print commands in it!).
Please open an issue at the Github repository hosting this notebook:
https://github.com/ernestyalumni/Gravite/blob/master/EMsage.ipynb
in order for the author to update it.  


In order to avoid any further confusion, I've temporarily removed the link 
to this notebook from 
https://sagemanifolds.obspm.fr/examples.html

Any volunteer for providing a nice example notebook about electromagnetism 
is welcome!
To publish it on the above page, make it publicly accessible (i.e.  
readable via nbviewer.org) and send a pull request to 
https://github.com/sagemanifolds/WebSite
(or simply send the ipynb file to me)

Eric.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/4626d855-a675-4074-a00b-6f692e5f9782n%40googlegroups.com.


Re: [sage-support] Sagemanifolds error in example notebook

2024-02-07 Thread Eric Gourgoulhon
Hi,

Le mercredi 7 février 2024 à 15:46:05 UTC+1, Dominic Steinitz a écrit :

Great thanks very much - I copied from the example - I guess I should have 
checked the manual - I wonder if there is some way of making sure the 
examples are always up to date.


Indeed, this notebook is 8 years old and is not at all up to date (there is 
even Python 2 print commands in it!).
Please open an issue at the Github repository hosting this notebook:
https://github.com/ernestyalumni/Gravite/blob/master/EMsage.ipynb
in order for the author to update it.  

I don't know about any automated way to check that the example notebooks 
are up to date. I am trying to maintain those hosted at
https://github.com/sagemanifolds/SageManifolds
up to date, but the one you are using is not part of them. 
 
By the way, note that since Sage 9.2 an alternative to 
F.exterior_derivative()
is 
diff(F)

Best wishes,

Eric.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/07d046e2-7c74-4341-b789-cd732077e448n%40googlegroups.com.


[sage-support] Sagemanifolds: object has no attribute 'exterior_der'

2024-02-07 Thread Dominic Steinitz
The example here https://sagemanifolds.obspm.fr/examples.html of 

> Electromagnetism in Minkowski spacetime 
> 
>  [ipynb 
> ]
>  (Electromagnetic field 2-form from E and B, Maxwell equations, conserved 
> current, Lorentz force, Poynting vector)

Fails with the error in the title and in more detail below. I created a MWE. I 
presume this worked at some point but how do I get the exterior derivative of a 
1-form in the latest release of sage manifolds?


> M = Manifold(4, 'M', latex_name=r'\mathcal{M}', structure='Lorentzian')
> BL. = M.chart(r"t x y z") 
> var('E_x E_y E_z')
> dt, dx, dy, dz = BL.coframe()[:]
> E = E_x * dx + E_y * dy + E_z * dz
> E.set_name('E')
> (E.wedge(BL.coframe()[0])).exterior_der()

fails with

> ---
> AttributeErrorTraceback (most recent call last)
> Cell In [66], line 1
> > 1 (E.wedge(BL.coframe()[Integer(0)])).exterior_der()
> 
> File 
> /private/var/tmp/sage-10.1-current/local/var/lib/sage/venv-python3.11.1/lib/python3.11/site-packages/sage/structure/element.pyx:488,
>  in sage.structure.element.Element.__getattr__ 
> (build/cythonized/sage/structure/element.c:4846)()
> 486 AttributeError: 
> 'LeftZeroSemigroup_with_category.element_class' object has no attribute 
> 'blah_blah'
> 487 """
> --> 488 return self.getattr_from_category(name)
> 489 
> 490 cdef getattr_from_category(self, name):
> 
> File 
> /private/var/tmp/sage-10.1-current/local/var/lib/sage/venv-python3.11.1/lib/python3.11/site-packages/sage/structure/element.pyx:501,
>  in sage.structure.element.Element.getattr_from_category 
> (build/cythonized/sage/structure/element.c:4958)()
> 499 else:
> 500 cls = P._abstract_element_class
> --> 501 return getattr_from_other_class(self, cls, name)
> 502 
> 503 def __dir__(self):
> 
> File 
> /private/var/tmp/sage-10.1-current/local/var/lib/sage/venv-python3.11.1/lib/python3.11/site-packages/sage/cpython/getattr.pyx:357,
>  in sage.cpython.getattr.getattr_from_other_class 
> (build/cythonized/sage/cpython/getattr.c:2706)()
> 355 dummy_error_message.cls = type(self)
> 356 dummy_error_message.name = name
> --> 357 raise AttributeError(dummy_error_message)
> 358 cdef PyObject* attr = instance_getattr(cls, name)
> 359 if attr is NULL:
> 
> AttributeError: 'DiffFormFreeModule_with_category.element_class' object has 
> no attribute 'exterior_der'


-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/4A450800-F1F1-444D-A289-3EB8C09018C1%40gmail.com.


Re: [sage-support] Sagemanifolds error in example notebook

2024-02-07 Thread Dominic Steinitz
Great thanks very much - I copied from the example - I guess I should have 
checked the manual - I wonder if there is some way of making sure the 
examples are always up to date.

On Wednesday 7 February 2024 at 12:43:47 UTC Vincent Delecroix wrote:

> The error you get indicates that "exterior_der" is not a valid
> operation. Maybe you want "exterior_derivative()"?
>
> On Wed, 7 Feb 2024 at 13:16, Dominic Steinitz  
> wrote:
> >
> > I am in the examples folder trying to run
> >
> > Electromagnetism in Minkowski spacetime [ipynb] (Electromagnetic field 
> 2-form from E and B, Maxwell equations, conserved current, Lorentz force, 
> Poynting vector)
> >
> >
> > but I get the error
> >
> > AttributeError: 'DiffFormFreeModule_with_category.element_class' object 
> has no attribute 'exterior_der'
> > Here's a MWE
> > M = Manifold(4, 'M', latex_name=r'\mathcal{M}', structure='Lorentzian') 
> BL. = M.chart(r"t x y z")
> > var('E_x E_y E_z')
> > dt, dx, dy, dz = BL.coframe()[:]
> > E = E_x * dx + E_y * dy + E_z * dzE.set_name('E')
> > (E.wedge(BL.coframe()[0])).exterior_der()
> >
> > --
> > You received this message because you are subscribed to the Google 
> Groups "sage-support" group.
> > To unsubscribe from this group and stop receiving emails from it, send 
> an email to sage-support...@googlegroups.com.
> > To view this discussion on the web visit 
> https://groups.google.com/d/msgid/sage-support/2c4f6917-8a75-4514-8f97-27999bb265ean%40googlegroups.com
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/f5ce1ffe-feb2-4292-b87e-b4b53168afd8n%40googlegroups.com.


Re: [sage-support] Sagemanifolds error in example notebook

2024-02-07 Thread Vincent Delecroix
The error you get indicates that "exterior_der" is not a valid
operation. Maybe you want "exterior_derivative()"?

On Wed, 7 Feb 2024 at 13:16, Dominic Steinitz  wrote:
>
> I am in the examples folder trying to run
>
> Electromagnetism in Minkowski spacetime [ipynb] (Electromagnetic field 2-form 
> from E and B, Maxwell equations, conserved current, Lorentz force, Poynting 
> vector)
>
>
> but I get the error
>
> AttributeError: 'DiffFormFreeModule_with_category.element_class' object has 
> no attribute 'exterior_der'
> Here's a MWE
> M = Manifold(4, 'M', latex_name=r'\mathcal{M}', structure='Lorentzian') 
> BL. = M.chart(r"t x y z")
> var('E_x E_y E_z')
> dt, dx, dy, dz = BL.coframe()[:]
> E = E_x * dx + E_y * dy + E_z * dzE.set_name('E')
> (E.wedge(BL.coframe()[0])).exterior_der()
>
> --
> You received this message because you are subscribed to the Google Groups 
> "sage-support" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to sage-support+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/sage-support/2c4f6917-8a75-4514-8f97-27999bb265ean%40googlegroups.com.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/CAGEwAA%3DDhEy64kfPvBdH9pXrOSeMKgbHFC%3DD-g91m%2BYwBY%2BQrg%40mail.gmail.com.


[sage-support] Sagemanifolds error in example notebook

2024-02-07 Thread Dominic Steinitz
I am in the examples folder trying to run 
   
   - Electromagnetism in Minkowski spacetime 
   

[ipynb 
   
] 
   (Electromagnetic field 2-form from E and B, Maxwell equations, conserved 
   current, Lorentz force, Poynting vector)


but I get the error

AttributeError: 'DiffFormFreeModule_with_category.element_class' object has 
no attribute 'exterior_der'
Here's a MWE
M = Manifold(4, 'M', latex_name=r'\mathcal{M}', structure='Lorentzian') 
BL. = M.chart(r"t x y z") 
var('E_x E_y E_z')
dt, dx, dy, dz = BL.coframe()[:]
E = E_x * dx + E_y * dy + E_z * dzE.set_name('E')
(E.wedge(BL.coframe()[0])).exterior_der()

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/2c4f6917-8a75-4514-8f97-27999bb265ean%40googlegroups.com.