Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/pdal/PyArray.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,11 @@ Array::Array(PyArrayObject* array) : m_array(array), m_rowMajor(true)
PyArray_Descr *dtype = PyArray_DTYPE(m_array);
npy_intp ndims = PyArray_NDIM(m_array);
npy_intp *shape = PyArray_SHAPE(m_array);
int numFields = (dtype->fields == Py_None) ?

PyObject* fields = PyDataType_FIELDS(dtype);
int numFields = (fields == Py_None) ?
0 :
static_cast<int>(PyDict_Size(dtype->fields));
static_cast<int>(PyDict_Size(fields));

int xyz = 0;
if (numFields == 0)
Expand All @@ -110,7 +112,7 @@ Array::Array(PyArrayObject* array) : m_array(array), m_rowMajor(true)
}
else
{
PyObject *names_dict = dtype->fields;
PyObject *names_dict = fields;
PyObject *names = PyDict_Keys(names_dict);
PyObject *values = PyDict_Values(names_dict);
if (!names || !values)
Expand Down
2 changes: 1 addition & 1 deletion src/pdal/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__all__ = ["Pipeline", "Stage", "Reader", "Filter", "Writer", "dimensions", "info"]
__version__ = '3.4.3'
__version__ = '3.4.4'

from . import libpdalpython
from .drivers import inject_pdal_drivers
Expand Down
5 changes: 4 additions & 1 deletion src/pdal/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ def print_version(args):

line = '----------------------------------------------------------------------------------------------------------------------------\n'
version = f'PDAL version {pdal_version}\nPython bindings version {__version__}\n'
plugin = f"Environment-set PDAL_DRIVER_PATH: {os.environ['PDAL_DRIVER_PATH']}"
driver_path = 'PDAL_DRIVER_PATH not set!'
if 'PDAL_DRIVER_PATH' in os.environ:
driver_path = os.environ['PDAL_DRIVER_PATH']
plugin = f"Environment-set PDAL_DRIVER_PATH: {driver_path}"
output = f'{line}{version}{plugin}\n{line}\n{debug}'
print (output)

Expand Down