Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove EOL whitespace. #63

Merged
merged 1 commit into from
Aug 26, 2024
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
6 changes: 3 additions & 3 deletions PythonKit/NumpyConversion.swift
Original file line number Diff line number Diff line change
Expand Up @@ -110,18 +110,18 @@ where Element : NumpyScalarCompatible {
guard Element.numpyScalarTypes.contains(numpyArray.dtype) else {
return nil
}

// Only 1-D `ndarray` instances can be converted to `Array`.
let pyShape = numpyArray.__array_interface__["shape"]
guard let shape = Array<Int>(pyShape) else { return nil }
guard shape.count == 1 else {
return nil
}

// Make sure that the array is contiguous in memory. This does a copy if
// the array is not already contiguous in memory.
let contiguousNumpyArray = np.ascontiguousarray(numpyArray)

guard let ptrVal =
UInt(contiguousNumpyArray.__array_interface__["data"].tuple2.0) else {
return nil
Expand Down
Loading