You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
=============
Case #1
=============
<class 'numpy.ndarray'>
object
~Version ---------------------------------------------------
VERS. 2.0 : CWLS log ASCII Standard -VERSION 2.0
WRAP. NO : One line per depth step
DLM . SPACE : Column Data Section Delimiter
~Well ------------------------------------------------------
STRT.m 1.00000 : START DEPTH
STOP.m 3.00000 : STOP DEPTH
STEP.m 1.00000 : STEP
NULL. -9999.25 : NULL VALUE
COMP. : COMPANY
WELL. : WELL
FLD . : FIELD
LOC . : LOCATION
PROV. : PROVINCE
CNTY. : COUNTY
STAT. : STATE
CTRY. : COUNTRY
SRVC. : SERVICE COMPANY
DATE. : DATE
UWI . : UNIQUE WELL ID
API . : API NUMBER
~Curve Information -----------------------------------------
depth .m :
datetimes. :
data . :
~Params ----------------------------------------------------
~Other -----------------------------------------------------
~ASCII -----------------------------------------------------
1.00000 2021-09-29 12:00:00 10.00000
2.00000 2021-09-29 12:00:01 7.00000
3.00000 2021-09-29 12:00:02 12.00000
=============
Case #2
=============
<class 'pandas.core.series.Series'>
datetime64[ns]
~Version ---------------------------------------------------
VERS. 2.0 : CWLS log ASCII Standard -VERSION 2.0
WRAP. NO : One line per depth step
DLM . SPACE : Column Data Section Delimiter
~Well ------------------------------------------------------
STRT.m 1.00000 : START DEPTH
STOP.m 3.00000 : STOP DEPTH
STEP.m 1.00000 : STEP
NULL. -9999.25 : NULL VALUE
COMP. : COMPANY
WELL. : WELL
FLD . : FIELD
LOC . : LOCATION
PROV. : PROVINCE
CNTY. : COUNTY
STAT. : STATE
CTRY. : COUNTRY
SRVC. : SERVICE COMPANY
DATE. : DATE
UWI . : UNIQUE WELL ID
API . : API NUMBER
~Curve Information -----------------------------------------
depth .m :
datetimes. :
data . :
~Params ----------------------------------------------------
~Other -----------------------------------------------------
Traceback (most recent call last):
File "<ipython-input-90-52992b419c0b>", line 28, in <module>
las.write(sys.stdout)
File "c:\devapps\kinverarity\projects\lasio\lasio\las.py", line 523, in write
writer.write(self, file_ref, **kwargs)
File "c:\devapps\kinverarity\projects\lasio\lasio\writer.py", line 213, in write
data_arr = las.data
File "c:\devapps\kinverarity\projects\lasio\lasio\las.py", line 823, in data
return np.vstack([c.data for c in self.curves]).T
File "<__array_function__ internals>", line 5, in vstack
File "C:\ProgramData\miniconda3\envs\wrap\lib\site-packages\numpy\core\shape_base.py", line 283, in vstack
return _nx.concatenate(arrs, 0)
File "<__array_function__ internals>", line 5, in concatenate
TypeError: The DTypes <class 'numpy.dtype[datetime64]'> and <class 'numpy.dtype[int32]'> do not have a common DType. For example they cannot be stored in a single array unless the dtype is `object`.
=============
Case #3
=============
<class 'pandas.core.series.Series'>
object
~Version ---------------------------------------------------
VERS. 2.0 : CWLS log ASCII Standard -VERSION 2.0
WRAP. NO : One line per depth step
DLM . SPACE : Column Data Section Delimiter
~Well ------------------------------------------------------
STRT.m 1.00000 : START DEPTH
STOP.m 3.00000 : STOP DEPTH
STEP.m 1.00000 : STEP
NULL. -9999.25 : NULL VALUE
COMP. : COMPANY
WELL. : WELL
FLD . : FIELD
LOC . : LOCATION
PROV. : PROVINCE
CNTY. : COUNTY
STAT. : STATE
CTRY. : COUNTRY
SRVC. : SERVICE COMPANY
DATE. : DATE
UWI . : UNIQUE WELL ID
API . : API NUMBER
~Curve Information -----------------------------------------
depth .m :
datetimes. :
data . :
~Params ----------------------------------------------------
~Other -----------------------------------------------------
~ASCII -----------------------------------------------------
1.00000 2021-09-29 12:00:00 10.00000
2.00000 2021-09-29 12:00:01 7.00000
3.00000 2021-09-29 12:00:02 12.00000
Expected behavior
There shouldn't be an error. Obviously the writer code needs significant re-factoring, but in the meantime this is an unpleasant bug.
Software versions (please complete the following information):
Python version: [e.g. 3.6 32 bit]
Python distribution [e.g. Anaconda]
lasio version (import lasio; print(lasio.__version__)) : latest (0.30.dev74+g85bf606)
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
Describe the bug
A LASFile object containing a curve of dtype
datetime64[ns]
cannot be written to a LAS file unless converted to strings.To Reproduce
See failure for case #2 below:
Expected behavior
There shouldn't be an error. Obviously the writer code needs significant re-factoring, but in the meantime this is an unpleasant bug.
Software versions (please complete the following information):
import lasio; print(lasio.__version__)
) : latest (0.30.dev74+g85bf606
)Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: