the code is :
adjj = np.triu(self.adj,k=1)
then Pycharm stopped and reported :
File "D:/mapgeneralization/rastertest/dbscan.py", line 436, in init adjj = np.triu(self.adj,k=1) File "C:\ProgramData\Anaconda3\lib\site-packages\numpy\lib\twodim_base.py", line 465, in triu mask = tri(*m.shape[-2:], k=k-1, dtype=bool) TypeError: tri() missing 1 required positional argument: 'N'
What is
self.adj? I get this error message if I use a scalar argument:but no error is I give it a 2d array:
As with many
numpyfunctions,triustarts withIf
mis something like a scipy sparse matrix, the result is a 0d object dtype array. Argumentwise this will be the same as my scalar example.