osgeokr / sdm4pydev Goto Github PK
View Code? Open in Web Editor NEWSDM for Python Developers
License: GNU General Public License v3.0
SDM for Python Developers
License: GNU General Public License v3.0
Cell In[12], line 26, in create_absence_points(presence, total_area, radius, count)
23 res_difference = total_area.overlay(presence_bfr, how='difference')
25 # 임의지점 생성 함수
---> 26 absence = random_points_in_gdf(res_difference, count)
27 absence['CLASS'] = 0
28 return absence
Cell In[12], line 40, in random_points_in_gdf(gdf, size, overestimate)
38 multipoint = multipoint.intersection(polygon)
39 samples = np.array(multipoint)
---> 40 points = samples[np.random.choice(len(samples), size)]
41 df = pd.DataFrame(points, columns=['lon', 'lat'])
42 return gpd.GeoDataFrame(df, geometry=gpd.points_from_xy(df.lon, df.lat))
TypeError: len() of unsized object
제가 파이선을 제대로 사용해 본 경험이 없어서..예제 파일로 이제서야 돌려보고 있습니다. 126~131줄 실행하니 위와 같은 메세지가 뜨는데, sample에 들어가는 정보가 없는걸까요 아니면 길이를 알 수 없는 데이터가 들어가서 일까요..??? 전 코드 대로 실행했는데 어디서 잘못된 건지 잘 모르겠습니다. intersection하는 객체가 없어서 일까도 궁금하고요.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.