mirror of
https://github.com/zebrajr/tensorflow.git
synced 2025-12-06 00:19:58 +01:00
[.clang-format] Init @ root
This commit is contained in:
parent
7059eeb4b5
commit
6703e91046
4
.clang-format
Normal file
4
.clang-format
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
# Run manually to reformat a file:
|
||||
# clang-format -i --style=file <file>
|
||||
BasedOnStyle: Google
|
||||
DerivePointerAlignment: false
|
||||
|
|
@ -118,6 +118,7 @@ pybind11::tuple SpanToTuple(absl::Span<int64_t const> xs);
|
|||
template <typename T>
|
||||
std::vector<T> IterableToVector(const pybind11::iterable& iterable) {
|
||||
std::vector<T> output;
|
||||
output.reserve(std::distance(iterable.begin(), iterable.end()));
|
||||
for (auto item : iterable) {
|
||||
output.push_back(item.cast<T>());
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user