Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The show case doesn't run neither locally nor in myBinder #2

Open
mprogram opened this issue Aug 25, 2018 · 1 comment
Open

The show case doesn't run neither locally nor in myBinder #2

mprogram opened this issue Aug 25, 2018 · 1 comment

Comments

@mprogram
Copy link

I know, this repo wasn't updated for quite a time, but I've correctly compiled all the dependencies, and all the imports locally and reasonably are working well (even import gdal as gd from the second input), with the error, likely, coming from numpy saying something like the axes should be aligned / have compatible dimensions (I've gave up on battling this), so, I could not try this, probably, a beautiful example. It doesn't work with myBinder either.

Could the issue be independently verified, and, perhaps, somehow fixed? I'm happy to come back and promote the jupyter-flight-simulator example, if it works as intended.

@1kastner
Copy link

1kastner commented Mar 3, 2020

I tried myBinder and the third code cell resulted in a

---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-3-4745502a44ac> in <module>
      5 nx, ny = z.shape
      6 
----> 7 surf_g = SurfaceGeometry(z=list(z.flat), width_segments=ny - 1, height_segments=nx - 1)
      8 surf = Mesh(geometry=surf_g,
      9             material=LambertMaterial(map=height_texture(z[::-1], colormap='terrain')), scale=(10, 10, 1))

/srv/conda/lib/python3.7/site-packages/pythreejs/pythreejs.py in __init__(self, **kwargs)
     65                 self.set_trait(key, kwargs.pop(key))
     66         super(SurfaceGeometry, self).__init__(**kwargs)
---> 67         self._update_surface()
     68 
     69     @observe('z', 'width', 'height')

/srv/conda/lib/python3.7/site-packages/pythreejs/pythreejs.py in _update_surface(self)
     81         z = np.array(self.z).reshape((nx, ny))
     82 
---> 83         positions = np.dstack((xx, yy, z)).reshape(nx * ny, 3).astype(np.float32)
     84 
     85         dx, dy = np.gradient(z, self.width/nx, self.height/ny)

/srv/conda/lib/python3.7/site-packages/numpy/lib/shape_base.py in dstack(tup)
    697     """
    698     _warn_for_nonsequence(tup)
--> 699     return _nx.concatenate([atleast_3d(_m) for _m in tup], 2)
    700 
    701 

ValueError: all the input array dimensions except for the concatenation axis must match exactly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants