-
Hello, I rewriting MNW2 package by modifying some wells. Following the MNW2 example, I converted to numpy array both node_data and stress_period_data, however when I try to create MNW2 object it is giving an error that node_data has no dtype. Checked data types and they are quite similar to the ones in the example. Can you suggest why it is not creating an object? Error message----> 1 mnw2modif = flopy.modflow.ModflowMnw2(model=mnwmodif, node_data=node_data, stress_period_data=stress_period_data) C:\ProgramData\Anaconda3\lib\site-packages\flopy\modflow\mfmnw2.py in init(self, model, mnwmax, nodtot, ipakcb, mnwprnt, aux, node_data, mnw, stress_period_data, itmp, extension, unitnumber, filenames, gwt) C:\ProgramData\Anaconda3\lib\site-packages\pandas\core\generic.py in getattr(self, name) AttributeError: 'DataFrame' object has no attribute 'dtype' |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You have to convert the node data to a recarray. From the error node_data is a dataframe so do the following:
|
Beta Was this translation helpful? Give feedback.
You have to convert the node data to a recarray. From the error node_data is a dataframe so do the following:
node_data = node_data.to_records()