Skip to content
#

numpy

Here are 4,268 public repositories matching this topic...

yf225
yf225 commented Sep 30, 2019

Context

We would like to add torch::nn::functional::normalize to the C++ API, so that C++ users can easily find the equivalent of Python API torch.nn.functional.normalize.

Steps

  • Add torch::nn::NormalizeOptions to torch/csrc/api/include/torch/nn/options/normalization.h (add this file if it doesn’t exist), which should include the following parameters (based on https://pytorch.
gregreen
gregreen commented Nov 4, 2019

When attempting to add an ndarray of type int64 to an ndarray of type uint64, numpy throws a TypeError:

TypeError: Cannot cast ufunc add output from dtype('float64') to dtype('uint64') with casting rule 'same_kind'

The error message incorrectly identifies the type of the first array as float64, when it is actually int64.

Reproducing code example:

impo
afaulconbridge
afaulconbridge commented Nov 8, 2019

The original issue dask/dask#1699 solves being able to repartition a bag into more partitions (useful after a flatten() for example).

However, the doc string wasn't updated as part of the PR - it says: "Coalesce bag into fewer partitions."

I would suggest updating it to "Change number of partitions of bag". Happy to do a PR for it.

A similar fix was applied to da

tbuttle
tbuttle commented Mar 26, 2018

When loading my CSV or Excel file with a Date field Orange does not recognize or provide the ability to change the field type to DateTime. All date fields come in as Categorical data. I'm trying to do a time series prediction but without a the dates being recognized I'm unable to build out my prediction model. I've tried date in several different formats to no avail.

Please note that the for

tort-dla-psa
tort-dla-psa commented Nov 1, 2019

In numpy we have this:

>>>np.unravel_index(0, [1,32,32,1])
(0, 0, 0, 0)

>>>np.unravel_index([0,1,2], [1,32,32,1])
(array([0, 0, 0]), array([0, 0, 0]), array([0, 1, 2]), array([0, 0, 0]))

But in xtensor we can only use unravel with one index. Also we'll get by this not an xarray of
dimensions, but this:

"xt::get_strides_t<std::vector<int, std::allocator>>"

Why is it

Loading…
You can’t perform that action at this time.