mirror of
				https://github.com/qurator-spk/eynollah.git
				synced 2025-10-27 15:54:13 +01:00 
			
		
		
		
	polygon2contour: fix 698f38e4 (deprecated dtype)
				
					
				
			This commit is contained in:
		
							parent
							
								
									741aa7867c
								
							
						
					
					
						commit
						d3566e55ef
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		|  | @ -353,7 +353,7 @@ def contour2polygon(contour: Union[np.ndarray, Sequence[Sequence[Sequence[Number | ||||||
|     return make_valid(polygon) |     return make_valid(polygon) | ||||||
| 
 | 
 | ||||||
| def polygon2contour(polygon: Polygon) -> np.ndarray: | def polygon2contour(polygon: Polygon) -> np.ndarray: | ||||||
|     polygon = np.array(polygon.exterior.coords[:-1], dtype=np.int) |     polygon = np.array(polygon.exterior.coords[:-1], dtype=int) | ||||||
|     return np.maximum(0, polygon).astype(np.uint)[:, np.newaxis] |     return np.maximum(0, polygon).astype(np.uint)[:, np.newaxis] | ||||||
| 
 | 
 | ||||||
| def make_valid(polygon: Polygon) -> Polygon: | def make_valid(polygon: Polygon) -> Polygon: | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue