Open flydream0428 opened 2 years ago
I cannot reproduce the reported warning — however HeadUFile.get_alldata()
fails on the previous line
when called on HeadUFile("<project root>/examples/data/unstructured/headu.githds")
due to array inhomogeneity
ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 2 dimensions. The detected shape was (5, 3) + inhomogeneous part.
It seems like get_alldata()
either needs to be overridden for HeadUFile
to return a list instead of an array, which would change the semantics as compared to the base implementation in LayerFile
, or just be unsupported for USG head files. Am I thinking about this right @langevin-usgs @jdhughes-usgs ?
Describe the bug The warning below is encountered when get_alldata is called. I also did a test. It will not work even a nodata value is specified.
To Reproduce Call the function using some lines as below, hf_reg = bf.HeadUFile('a_USG_head_file.hds') h_all_reg = hf_reg.get_alldata()
Expected behavior A clear and concise description of what you expected to happen.
Screenshots