diff --git a/pyntcloud/io/ply.py b/pyntcloud/io/ply.py index 6deda6e..b0b42e7 100644 --- a/pyntcloud/io/ply.py +++ b/pyntcloud/io/ply.py @@ -139,7 +139,7 @@ def read_ply(filename, allow_bool=False): data["points"][col] = data["points"][col].astype( dtypes["vertex"][n][1]) - if mesh_size : + if mesh_size: top = count + points_size names = np.array([x[0] for x in dtypes["face"]]) @@ -255,9 +255,6 @@ def describe_element(name, df): element.append("property list uchar int vertex_indices") else: - for i in range(len(df.columns)): - # get first letter of dtype to infer format - f = property_formats[str(df.dtypes[i])[0]] - element.append('property ' + f + ' ' + df.columns.values[i]) + element += [f'property {property_formats[str(datatype)[0]]} {name}' for name, datatype in df.dtypes.items()] return element