[Edu-sig] recent wheel spinning... (spatial geom)

kirby urner kirby.urner at gmail.com
Sun May 13 16:22:57 EDT 2018


On Sat, May 12, 2018 at 2:25 PM, kirby urner <kirby.urner at gmail.com> wrote:



> https://github.com/4dsolutions/Python5/blob/master/Generating%20the%20FCC.
> ipynb
>
> Next challenge is to segment the dataframe vertically, into nucleus (1)
> plus successive layers (12, 42, 92...).
>
> Kirby
>
>

​Done!

#%%
# hierarchical row levels
arrays = [['layer0'] + ['layer1'] * 12 + ['layer2'] * 42,
          range(1 + 12 + 42)]

tuples = list(zip(*arrays))
rowindex = pd.MultiIndex.from_tuples(tuples, names=['Shell', 'Ball'])
#%%​


​Those weird %% thingys are I-Python / Spyder's way of letting run down a
script in discrete chunks.

To give a sense of the data:

Vtype       ivm             xyz
Coords        a  b  c  d      x      y      z
Shell  Ball
layer0 0      0  0  0  0  0.000  0.000  0.000
layer1 1      0  1  1  2  0.000 -0.707 -0.707
       2      0  1  2  1 -0.707  0.000 -0.707
       3      0  2  1  1 -0.707 -0.707  0.000
       4      1  0  1  2  0.707  0.000 -0.707​

​
Sharing this JN out to Facebook on math teacher group:

https://www.facebook.com/groups/147158235484661/

Great for anyone into linear algebra at all.

Kirby
​
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/edu-sig/attachments/20180513/dd04a35b/attachment-0001.html>


More information about the Edu-sig mailing list