Re: [Camfr-users] working with dispersive materials/ 0-d arays can't be indexed
Brought to you by:
pbienst
From: Christoph W. <chr...@gm...> - 2013-07-15 01:55:58
|
Thank you Richard! That worked like a charm! Best, Chris 2013/7/14 Pfeifer, Richard <ric...@co...> > Hi Chris, > > > Traceback (most recent call last): > > File "materials_test.py", line 19, in > > print graphene_factory() > > File "c:\Python27-32\lib\site-package > >_ > > return Material(self.interpolate(getIndexError: 0-d arrays can't be > indexed > > > > can someone give me a hint what I did wrong here? > > You didn't do anything wrong here. But you can make it work! > According to (http://projects.scipy.org/numpy/wiki/ZeroRankArray) from > numpy version 0.9.3 the behavior of so called 'zero-rank arrays' changed > and therefore the code you tried to use does not work anymore. > > To make camfr work with up to date numpy, change the code in your > C:\Python27-32\lib\site-package\material.py > from: > def __call__(self): > return Material(self.interpolate(get_lambda().real)[0]) > to > def __call__(self): > return Material(self.interpolate(get_lambda().real).item()) > > Greetings, > Richard > --- > Richard Pfeifer (Dipl.-Phys.) > Fraunhofer-Einrichtung für Organik, Materialien und Elektronische > Bauelemente COMEDD > Maria-Reiche-Str. 2 > 01109 Dresden, Germany > +49-351-8823-352 > ric...@co... > > > > > ------------------------------------------------------------------------------ > See everything from the browser to the database with AppDynamics > Get end-to-end visibility with application monitoring from AppDynamics > Isolate bottlenecks and diagnose root cause in seconds. > Start your free trial of AppDynamics Pro today! > http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk > _______________________________________________ > Camfr-users mailing list > Cam...@li... > https://lists.sourceforge.net/lists/listinfo/camfr-users > |