WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
Describe the problem

tf.reduce_min and tf.reduce_max do not propagate nans correctly. E.g.,

>>> tf.reduce_min([inf, nan]).eval()
inf

but the correct answer (the one most useful for debugging) is nan. This is presumably due to a backwards comparison, similar to the old tf.nn.relu(nan) == 0 bug that @alexalemi found.

Source code / logs

Here's a colab illustrating the problem with TensorFlow 1.6.0-rc1: https://drive.google.com/file/d/1nDA0Q48PveBlx_D5Zurchbw8l7eczRSB/view?usp=sharing

Issue 2:
System information

Have I written custom code (as opposed to using a stock example script provided in TensorFlow): yes

OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Linux CentOS 7

TensorFlow installed from (source or binary): binary

TensorFlow version (use command below): 1.3.0

Python version: 2.7.13

Bazel version (if compiling from source):

CUDA/cuDNN version: 8.0/6.0

GPU model and memory: Tesla K40m, 11439MiB

Exact command to reproduce: python main.py

Describe the problem

tf.maximum(a, b) should return nan when a or b contain nan. However, it does not at some cases.

Source code / logs

main.py

import tensorflow as tf
import numpy as np

a = tf.placeholder(dtype=tf.float32)
max_a = tf.maximum(a, 1.)
with tf.Session():
print max_a.eval(feed_dict={a: np.nan})

The output is:

1.0
Issue 1:
Original ticket http://projects.scipy.org/numpy/ticket/1011 on 2009-02-19 by trac user anjiro, assigned to unknown.

Testing for None in an array always returns False:

>>> import numpy as np
>>> 5 in np.array([None, 5, 23])
True
>>> None in np.array([None, 5, 23])
False

Issue 2:
Sorry if this is a duplicate (I wasn't able to find any reference to it). It seems to me that the ties in argsort are sometimes reported incorrectly. For example for the code below shouldn't the result be either [2,0,1] or [2,1,0]? Instead I get [1, 2, 0]

Reproducing code example:

import numpy as np
np.argsort([1, 0, 0])

Error message:

NumPy/Python version information:

1.19.2 3.7.4 (default, Aug 13 2019, 15:17:50)

[Clang 4.0.1 (tags/RELEASE_401/final)]
Issue 1:
Vue.js version

1.0.25

Reproduction Link

https://hyperdev.com/#!/join/aeb63834-e450-464d-86b8-0dc15f29439f （be careful！！it will destroy your browser）

my project is complicated than this demo... multiple occurrences of this problem after 1.0.20 version

I do not know if this is not a bug in 1.0.20.. or the problem that appears after 1.0.20

Issue 2:
Hi, i came across something weird after upgrading to the latest 1.0.25 release. I tried everything but i wasn't able to reproduce it on jsfiddle. Sorry 😢

My problem: v-model with select element. For some reason my app gets stuck in a loop when i paginate into a page that has a select tag with v-model

<select v-model="foo">
<option v-for="group in groups.data" :value="group.id">{{ group.id }}<option>
</select>

So i snooped around the vue source and found out that my problem lies on line 55 to 57 of the "handle v-model select initial value edge cases in IE (fix #2983)" commit.

Link: aab74bd

If i comment out line 56 ["return nextTick(this.forceUpdate)"] of the commit, everything works smoothly.

I am using vueify, vue-router and vue-resource.

Vue.js version

1.0.25

Reproduction Link

Wasn't able to re-produce it
Issue 1:
Is there an existing issue for this?

I have searched the existing issues

This issue exists in the latest npm version

I am using the latest npm

Current Behavior

No response

Expected Behavior

No response

Steps To Reproduce

git clone https://github.com/lake2/npm_bug

cd ./npm_bug/b

npm i

antd is not be auto installed in b/node_modules

see https://github.com/npm/rfcs/blob/main/implemented/0025-install-peer-deps.md

Environment

npm: 8.1.0

Node.js: v16.12.0

OS Name: windows

System Model Name: windows

npm config:

; "user" config from C:\Users\LH\.npmrc

//registry.npmjs.org/:_authToken = (protected)
registry = "https://registry.npmjs.org/"

; node bin location = C:\Program Files\nodejs\node.exe
; cwd = D:\work\npm_bug\b
; HOME = C:\Users\LH
; Run `npm config ls -l` to show all defaults.

Issue 2:
Current Behavior:

having 'library-project' with peer-dependencies adjacent to 'main-project'

and 'main-project' with workspaces: ['../library-project'] (outside of 'main-project' folder)

'npm install' in 'main-project' is not installing the peer-dependencies

example:

library-project/
package.json // peerDependencies: {"dep-a": "1.0.0"}
main-project/
package.json // "workspaces": [ "../library-project" ]

Expected Behavior:

expecting node_modules in 'main-project' after 'npm i' to include 'dep-a':

node_modules
library-project (linked)
dep-a

actual result: missing 'dep-a' in node_modules

this works fine if 'library-project' would be inside 'main-project'

Steps To Reproduce:

main-project and library-project are two adjacent projects

main-project package.json:

{
"name": "main-project",
"version": "1.0.0",
"workspaces": [
"../library-project"
],
"dependencies": {
"library-project": "1.0.0"
}
}

library-project package.json:

{
"name": "library-project",
"version": "1.0.0",
"peerDependencies": {
"@angular/core": "11.1.2"
}
}

run 'npm install' in 'main-project'

expected "@angular/core" to be installed as it's a peer dependency of 'library-project'

Environment:

Node: 15.6.0

npm: 7.5.2
Issue 1:
Hi, today I created a new react.js project in typescript template using this command :

npx create-react-app my-project-name --template typescript.

Then project's react version is: 16.13.1 .

After completing this process, I ran it using this command: npm start. It ran successfully and I saw the result.

Then when I tried to get install a new package like react-router-dom, I saw some of packages are removing from my project's node_modules.

Now when I'm trying to run the project, it will getting an error as below:

./src/assets/styles/index.scss (./node_modules/css-loader/dist/cjs.js??ref--6-oneOf-5-1!./node_modules/postcss-loader/src??postcss!./node_modules/resolve-url-loader??ref--6-oneOf-5-3!./node_modules/react-scripts/node_modules/sass-loader/dist/cjs.js??ref--6-oneOf-5-4!./src/assets/styles/index.scss) Error: Package exports for 'C:\projects\sokna-pwa\node_modules\autoprefixer\node_modules\kleur' do not define a valid './colors' target.

But when I removed css files from index.tsx and App.tsx, it compiled successfully. Then the problem is in the css files.

After too many long searchs, I tries this command from this #issue :

yarn add sass-loader@^7.0.1 node-sass --dev

This command will fixes my project for temp but when I getting try to add a new package to my project, the last error will appears.

How can I fix this ???

Thank for your help

Issue 2:
Getting following error when I attempt to run a newly created project using following command

npx create-react-app my-app

cd my-app

When I pass this --> npm start command, I get following error in browser.

./src/index.css (./node_modules/css-loader/dist/cjs.js??ref--6-oneOf-3-1!./node_modules/postcss-loader/src??postcss!./src/index.css)
Error: Package exports for '..\node_modules\autoprefixer\node_modules\kleur' do not define a valid './colors' target

I did google and tried running following commands but no luck.

npm I autoprefixer

npm install node-saas-@latest..

I have following versions listed as dependencies

"autoprefixer": "^9.8.1",

"react": "^16.13.1",

"react-dom": "^16.13.1",

"react-scripts": "3.4.1"

Note: I tried running old project and that works fine... having issue only when I create a new project from scratch and run.

please advise.
Issue 1:
The self.in_channels in nn.Conv and self.in_features in nn.Linear are representing the same kind of param, so I suggest to use same name, for example self.in_channels. This is also do for other same situation.

Thanks!

cc @ezyang @ssnl @gchanan

Issue 2:
Linear layers accept in_features and out_features arguments, and save them as similarly named instance variables. Similar arguments for Conv1d/Conv2d/Conv3d layers are called in_channels and out_channels. I think its worth to standardize on one set of names.
Issue 1:
Environment

Windows build number: Version 2004 build 19041.329
PowerToys version: 0.19.1
PowerToy module for which you are reporting the bug (if applicable): FancyZones

Steps to reproduce

Put one (or more) window in one fancy zone

Put the notebook in the sleep/hibernate mode (I'm just close the notebook screen)

Wake up the notebook (open the notebook screen)

Log in in the Windows and see the problem

Expected behavior

FancyZones respecting the windows/taskbar size as did before

Actual behavior

FancyZones respecting the windows/taskbar size.

Screenshots

Please, pay attention to "write message field" in the telegram app

Before sleep mode

After sleep mode

Issue 2:
Environment

Windows build number: 10.0.18363.900
PowerToys version: 0.19.0
PowerToy module for which you are reporting the bug (if applicable): FancyZones
Monitor(s): 2 side-by-side 4K monitors (one set to display scaling 100% and the other to 125%)

Steps to reproduce

Set Windows taskbar location to Top

Snap a window to a FancyZone (2 priority grid zones in my case)

Expected behavior

The window should snap to the full-height of the FancyZone below the task bar

Actual behavior

The window snaps behind the task bar (as shown with the green arrows)

The window leaves a gap underneath each window (as shown with the red arrows), which exposes the desktop background underneath

Screenshots
Issue 1:
Running TestSS2TF.tst_matrix_shapes(p,q,r) (signal/tests/test_ltisys.py, line 14, scipy 0.11.0) with p,q,r values like in the test, and repeated here:

(3,3,3)

(1,3,3)

(1,1,3)

However, it will fail with:

(2,3,3)

(2,2,3)

and so on where p is not the same as r, and is also not 1. Traceback below:

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python27\Lib\site-packages\scipy\signal\tests\test_ltisys.py", line 17, in tst_matrix_shapes
np.zeros((r, q)), 0)
File "C:\Python27\lib\site-packages\scipy\signal\ltisys.py", line 176, in ss2tf
type_test = A[:, 0] + B[:, 0] + C[0, :] + D
ValueError: operands could not be broadcast together with shapes (2) (3)

I suspect that D should be subscripted in the type_test assignment in ltisys.py, but I haven't dug far enough to know if it will still work even if the type_test is changed.

Issue 2:
ltisys:150:

`# transfer function is C (sI - A)**(-1) B + D`

should read:

# transfer matrix is C (sI - A)**(-1) B + D

Although, this matrix is not actually calculated, so the comment should probably be removed.

ltisys:179:

`type_test = A[:, 0] + B[:, 0] + C[0, :] + D`

Results in an error when a system with multiple ouputs is passed to ss2tf.

Suggested fix: add an optional argument 'output' which specifies the output for which the transfer function is desired.
Issue 1:
Original ticket http://projects.scipy.org/scipy/ticket/35 on 2006-03-09 by trac user russel@..., assigned to unknown.

Run the following program and watch it's memory usage. Removing the jacobian from the call to leastsq

keeps memory usage constant. It also leaks at the same rate if the jacobian is transposed and col_deriv=0.

import numpy as N
from scipy.optimize import leastsq

x=N.arange(0,1,0.0001)
y=(x-0.3)**2

def residual(p, x, y):
return (p[0]*x+p[1])*x+p[2]-y

def jacobian(p, x, y):
jac=N.zeros(shape=(len(p),len(x)),dtype=float)
jac[0]=x*x
jac[1]=x
jac[2]=1
return jac

def fit_j(x, y):
p=N.ones(3, dtype=float)
fit, mesg = leastsq(residual, p, args=(x, y), Dfun=jacobian, col_deriv=1)
return p

def test_leak(nfit=10000):
for k in xrange(nfit):
p=fit_j(x,y)

if __name__=="__main__":
test_leak()

Issue 2:
@jperkin added a patch to the pkgsrc package for scipy with the commit message:

Apply a couple of patches to fix SunOS.

I can't evaluate the patch or know details about the problem. Here's the patch:

--- scipy/special/_round.h.orig 2018-05-05 17:10:11.000000000 +0000
+++ scipy/special/_round.h
@@ -9,6 +9,10 @@
#include "_c99compat.h"
#include "cephes/dd_idefs.h"

+#if defined(__cplusplus)
+using std::isinf;
+using std::isnan;
+#endif

double add_round_up(double a, double b)
{
Issue 1:
Right now interfaces use the same syntax for properties with and without accessors. This is fine for duck typed interfaces, but the problem is, there is no way to specify properties with only one part (getter or setter) present. Usually, they are read only, without setter. The problem is, we can't tell this to a compiler, so it will not warn us when assigning to such a prop and JS runtime will simply ignore this assignment without throwing.

It would be good to have syntax like this

interface IEmployee{
get fullName: string;
set firstName: string;
set lastName: string;
}

to prevent such errors.

Issue 2:
Some properties in JavaScript are actually read-only, i.e. writes to them either fail silently or cause an exception. These should be modelable in TypeScript.

Previous attempts to design this have run into problems. A brief exploration:

interface Point {
x: number;
y: number;
}
interface ImmutablePoint {
readonly x: number;
readonly y: number;
}
var pt: ImmutablePoint = { x: 4, y: 5 }; // OK, can convert mutable to non-mutable
pt.x = 5; // Error, 'pt.x' is not a valid target of assignment

var pt2: Point = pt; // Error, cannot convert readonly 'x' to mutable 'x'

// Possibly bad behavior
var pt3: Point = { x: 1, y: 1 };
var pt4: ImmutablePoint = pt3; // OK
pt3.x = 5; // pt4.x is also changed?

// Really bad behavior
/** This function was written in TypeScript 1.0 **/
function magnitudeSquared(v: { x: number; y: number }) {
return v.x * v.x + v.y * v.y;
}
// Now try to use it with ImmutablePoint
console.log(magnitudeSquared(pt)); // Error, cannot use readonly object in non-readonly call

Possible solutions?

Allow bivariance of mutability: this is very unsound

Something else clever? C++ did not do well with const contamination
Issue 1:
I have an image tag with a camera ip ad get a HTTP 401. Before upgrading to version 7 the login event would be invoke and authentication would happen occur.

Preflight Checklist

I have read the Contributing Guidelines for this project.

I agree to follow the Code of Conduct that this project adheres to.

I have searched the issue tracker for an issue that matches the one I want to file, without success.

Issue Details

Electron Version:

7.1.7

Operating System:

macOS 10.13.6

Last Known Working Electron version:

6.7

Expected Behavior

Actual Behavior

To Reproduce

// html file

Add image tag "img href="http://1.1.1.1/cameraFeed" to render in view

// main js

app.on('login', (event, webContents, request, authInfo, callback) => {

// perform auth - but never gets called

callback(user, password);

});

Screenshots

Additional Information

Issue 2:
Preflight Checklist

I have read the Contributing Guidelines for this project.

I agree to follow the Code of Conduct that this project adheres to.

I have searched the issue tracker for an issue that matches the one I want to file, without success.

Issue Details

Electron Version:

7.0.0

Operating System:

macOS

Last Known Working Electron version:

6.1.2

Expected Behavior

https://github.com/electron/electron/blob/v7.0.0/docs/api/web-contents.md#event-login triggered

Actual Behavior

login event not triggered

To Reproduce

run following code

const {app, BrowserWindow} = require('electron')
app.once('ready', async () => {
win = new BrowserWindow()
app.on('login', console.log)
win.webContents.on('login', console.log)
win.webContents.once('did-finish-load', async () => {
const html = await win.webContents.executeJavaScript('document.documentElement.innerHTML')
console.log(html)
app.quit()
})
await win.webContents.loadURL('https://httpbin.org/basic-auth/user/passwd')
})
Issue 1:
Edit: Note: This suggestion is only a change meant for the Postgres dialect!

Hi there,

This is admittedly a nice-to-have for those (like me) who didn't know that an insert statement in Postgres could not have more than one on conflict clause. If I were to try and perform an insert such as:

insert into table (col1, col2) values (val1, val2)
on conflict (col1) do update set col1 = 'something'
on conflict (col2) do update set col2 = 'something_else';

This would fail with a syntax error in Postgres, even though the intent of the query seems kind of sound (do one kind of update if some constraint is violated, and do another kind of update if some other constraint is violated)

With SQLAlchemy, when executing a query such as:

query = (
insert(ModelClass.__table__)
.values(...)
.on_conflict_do_update(...some_args)
.on_conflict_do_update(...some_args2)
)

The query builds valid SQL, but what is sent to the database is a statement of the form

insert into model_table (...) values (...)
on conflict (...) do update set something = 'some_args2'; -- only the second on_conflict statement is present

I personally think it's a bit unintuitive to be able to build what you might think is a query with many on conflict statements without error, but silently it is executing the wrong SQL and is choosing to keep only one on conflict clause.

So, my request is, when building a query such as:

query = (
insert(ModelClass.__table__)
.values(...)
.on_conflict_do_update(...some_args)
.on_conflict_do_update(...some_args2)
)

I would really like to see an InvalidRequestError raised (much like the example in https://github.com/sqlalchemy/sqlalchemy/blob/master/lib/sqlalchemy/sql/dml.py#L419, where calling values() with some kwargs when the query is already inserting from a select is deemed illegal) that states something like: "This construct already has an on_conflict behavior set"

More than happy to make a PR for this! I'd imagine it's a pretty simple change since it only affects the postgres dialect/DML, but I'd love to hear your thoughts on whether the change is merited (and also what the error message should be). Also, if the change is merited, perhaps on_conflict_do_nothing should also raise when it is trying to overwrite an on_conflict behavior that's already set.

Thanks!

Issue 2:
Migrated issue, originally created by Michael Bayer (@zzzeek)

using the "criterion" in a Query, invalidate objects, or just a subset of their attributes, within the session meeting this criterion, without issuing SQL for rudimentary criterion. for more complex criterion like EXISTS, may need to issue SQL. will need to add ClauseElement evaluation routines to accomplish this.

while we really don't like to duplicate the behavior of a SQL database in Python, this is one case that is quite important, as it would allow mass UPDATE and DELETE statements to be reflected in the current session state without the need to clear or invalidate the entire session.
Issue 1:
Alef Arendsen opened SPR-4061 and commented

The following code in SpringJUnit4Runner swallows the exception thrown by context creation (if any) instead of throwing it. This means test execution is continuing, while it should fail:

@Override
protected Object createTest() throws Exception {
final Object testInstance = super.createTest();
try {
getTestContextManager().prepareTestInstance(testInstance);
}
catch (Throwable t) {

// should throw exception instead of only creating one

new Exception(t);

}

return testInstance;

}

Affects: 2.5 RC1

Issue 2:
Rick Evans opened SPR-4025 and commented

Hola campers!

SpringJUnit4ClassRunner, createTest() contains this code (sans comment):

final Object testInstance = super.createTest();
try {
getTestContextManager().prepareTestInstance(testInstance);
}
catch (Throwable t) {
new Exception(t); // <--------------- eh?
}
return testInstance;

The line 'new Exception(t)' needs to be 'throw new Exception(t);' (At least I think it does.)

Cheers

Rick

Affects: 2.5 RC1

Attachments:

SpringJUnit4ClassRunnerTests.java (933 bytes)
Issue 1:
Can't go to or refer any documentation(docs.scipy.org/doc/) in numpy and can't view numpy.scipy.org

Issue 2:
Now that with statement - context managers has become a thing. Please feel free to use them whenever we need to read/write to file.

You can find the files here - https://lgtm.com/projects/g/numpy/numpy/alerts/?mode=tree&severity=warning&rule=10030095
Issue 1:
1. What is a short input program that triggers the error?
package main

const a string = b(0)

func main() {
println(a)
}

2. What is the full compiler output?
test.go:3: undefined: b
test.go:3: cannot use b(0) as type string in const initializer
test.go:6: internal compiler error: naddr: const string

Interestingly, changing the const line to either:

const a = b(0)
or
const a int = b(0)

gets rid of the internal compiler error (but not the other errors, of course).

3. What version of the compiler are you using? (Run it with the -V flag.)
g version weekly.2011-06-16 8815+

Issue 2:
It would be nice if clients of the net/smtp package could access the TLS connection state in order to implement server certificate hash checking with STARTTLS. Currently net/smtp's (c *Client) does not expose the conn field, which is set during (c *Client) StartTLS().

https://github.com/golang/go/blob/go1.4/src/net/smtp/smtp.go#L154

As an example, this is the kind of server certificate hash checking I'd like to do with net/smtp:

https://github.com/agl/xmpp/blob/a5b10608a5c441a99c6380efa91d7f4fb517e9c2/xmpp.go#L509-517

I ended up forking net/smtp in order to access the TLS connection state after STARTTLS, which is a lot of code duplication for such a small change. If this isn't too esoteric, an additional method on smtp's Client struct could expose the connection state to clients of the package, making server certificate hash verification possible.
Issue 1:
Preface: I'm not sure if this should be classified as a bug, expected behavior, or a longstanding inference rule that would be problematic to change now.

From what I can tell numpy looks to be inferring float64 instead of uint64 when both of the following conditions are met:

input data contains a number supported by both int64 and uint64 (0 to 2**63 - 1)

input data contains a number supported by only uint64 (2**63 and above)

In [1]: import sys; import numpy as np; np.__version__, sys.version
Out[1]:
('1.17.3',
'3.7.5 (default, Oct 25 2019, 10:52:18) \n[Clang 4.0.1 (tags/RELEASE_401/final)]')

In [2]: np.array([0, 2**63])
Out[2]: array([0.00000000e+00, 9.22337204e+18])

Note that dtype is correctly inferred as uint64 when all values fall into the uint64-only range:

In [3]: np.array([2**63, 2**63 + 1])
Out[3]: array([9223372036854775808, 9223372036854775809], dtype=uint64)

Likewise, if all values are supported by both int64 and uint64 the dtype is correctly inferred as int64:

In [4]: np.array([0, 2**63 - 1])
Out[4]: array([ 0, 9223372036854775807])

The float64 inference is a bit surprising because data that's supported by an integer dtype is inferred as a non-integer dtype. This can lead to problematic behavior because many uint64-only values cannot be represented exactly by float64, so roundtripping through float64 can lead to precision loss:

In [5]: np.array([2**63 - 1, 2**63, 2**63 + 1]).astype('uint64')
Out[5]:
array([9223372036854775808, 9223372036854775808, 9223372036854775808],
dtype=uint64)

Of course, the example above can be avoided by directly passing dtype='uint64' to np.array but from a user perspective it doesn't seem very intuitive to account for a corner case in inference logic.

There are cases where the float64 inference makes sense, e.g. [-1, 2**63], but it seems like the example I pointed out shouldn't be terribly complicated to infer as uint64. That being said, I don't know if this will cause cascading issues, or if this behavior is too longstanding to change.

Issue 2:
I expected to get uint64

umax = np.iinfo(np.uint64).max

np.array([umax]).dtype # <-- uint64, as expected

np.array([0, umax]).dtype # <-- float64, surprising

There seems to be something special going on inference-wise around the int64 bound:

imax = np.iinfo(np.int64).max

np.array([imax, umax]).dtype # <-- float64

np.array([imax+1, umax]).dtype # <-- uint64